{"id":227683,"date":"2020-09-10T00:22:08","date_gmt":"2020-09-10T07:22:08","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/java\/?p=227683"},"modified":"2020-09-10T20:23:16","modified_gmt":"2020-09-11T03:23:16","slug":"java-on-visual-studio-code-update-august-2020","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/java\/java-on-visual-studio-code-update-august-2020\/","title":{"rendered":"Java on Visual Studio Code Update \u2013 August 2020"},"content":{"rendered":"<p>Welcome back to the August update of Java on Visual Studio Code. In this update, we will focus on performance improvements and project management. On to the update.<\/p>\n<h3><strong>Performance improvements<\/strong><\/h3>\n<h4><strong>IntelliSense (a.k.a. Code Complete)<\/strong><\/h4>\n<p>IntelliSense is one of the most frequently used VS Code features. After carefully examined current design and implementation, we were able to identify areas for improvements. In brief, the performance of IntelliSense is highly impacted by the number of requests clients send to language server and the language server\u2019s capability to process these requests. As a result, our improvements have been focused on cutting unnecessary client requests and optimizing language server\u2019s processing capability. Although the improvements will take a couple of iterations, we have already seen very positive results through our latest releases in August. In our test with the latest releases, we are able to achieve over 80% performance improvement. The details of our test are:<\/p>\n<p><strong>Environment:<\/strong><\/p>\n<ul>\n<li>CPU: 2.9 GHz Dual-Core Intel Core i5<\/li>\n<li>Memory: 8 GB 2133 MHz LPDDR3<\/li>\n<li>OS: macOS Catalina 10.15.6<\/li>\n<li>VS Code version: 1.48.2<\/li>\n<li>Extension tested:<\/li>\n<\/ul>\n<table style=\"border-collapse: collapse; width: 100%; height: 161px;\">\n<tbody>\n<tr style=\"height: 27px;\">\n<td style=\"width: 43.0529%; height: 27px;\"><strong>Extension<\/strong><\/td>\n<td style=\"width: 28.2866%; height: 27px;\"><strong>Jul. release version<\/strong><\/td>\n<td style=\"width: 28.6604%; height: 27px;\"><strong>Aug. release version<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"width: 43.0529%; height: 53px;\">Language Support for Java(TM) by Red Hat<\/td>\n<td style=\"width: 28.2866%; height: 53px;\">0.65.0<\/td>\n<td style=\"width: 28.6604%; height: 53px;\">0.66.0<\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 43.0529%; height: 27px;\">Java Test Runner<\/td>\n<td style=\"width: 28.2866%; height: 27px;\">0.24.0<\/td>\n<td style=\"width: 28.6604%; height: 27px;\">0.24.2<\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 43.0529%; height: 27px;\">Project Manager for Java<\/td>\n<td style=\"width: 28.2866%; height: 27px;\">0.10.2<\/td>\n<td style=\"width: 28.6604%; height: 27px;\">0.13.0<\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"width: 43.0529%; height: 27px;\">Visual Studio IntelliCode<\/td>\n<td style=\"width: 28.2866%; height: 27px;\">1.2.9<\/td>\n<td style=\"width: 28.6604%; height: 27px;\">1.2.10<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Test:<\/strong><\/p>\n<p>In a Java file with 5000+ lines of test code, trigger IntelliSense by typing Character \u2018S\u2019, and wait till suggestion popped up. Repeat 5 times for July and August releases respectively. Each time, we measure duration between client\u2019s request time and language server\u2019s response time.<\/p>\n<p><strong>Results:<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"89\"><\/td>\n<td width=\"89\">#1<\/td>\n<td width=\"89\">#2<\/td>\n<td width=\"89\">#3<\/td>\n<td width=\"89\">#4<\/td>\n<td width=\"89\">#5<\/td>\n<td width=\"89\">Avg.<\/td>\n<\/tr>\n<tr>\n<td width=\"89\">Jul. release<\/td>\n<td width=\"89\">7420<\/td>\n<td width=\"89\">6745<\/td>\n<td width=\"89\">6653<\/td>\n<td width=\"89\">5051<\/td>\n<td width=\"89\">5063<\/td>\n<td width=\"89\">6186.4<\/td>\n<\/tr>\n<tr>\n<td width=\"89\">Aug. release<\/td>\n<td width=\"89\">923<\/td>\n<td width=\"89\">412<\/td>\n<td width=\"89\">469<\/td>\n<td width=\"89\">600<\/td>\n<td width=\"89\">752<\/td>\n<td width=\"89\">631.2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: right;\">Unit: ms<\/p>\n<h4><strong>Workspace refreshing<\/strong><\/h4>\n<p>For our users, it\u2019s rather common that workspace contains non-Java project related assets. For example, working on Node project, your workspace may contain \u201cnode_modules\u201d folder; using Git, your workspace may contain \u201c.git\u201d folder. If run into one of these cases, you may notice the performance of refreshing workspace is negatively impacted, because these folders are being processed, which is unnecessary. To improve, we introduced a new configuration \u201c<strong>java.project.resourceFilters<\/strong>\u201d, where you can specify folders or files that should be excluded from your workspace\u2019s refreshing. By default, \u2018node_modules\u2019 and \u201c.git\u201d folders are excluded. You can find the configuration by clicking <strong>Files<\/strong>-&gt;<strong>Preferences<\/strong>-&gt;<strong>Settings<\/strong> menu and then search for \u201c<strong>java.project.resourceFilters<\/strong>\u201d on settings view.<\/p>\n<h3><strong>Project View<\/strong><\/h3>\n<p>In July, we introduced the project view. Our goal is to allow you accessing all project management related functions through this single view. In August, we consolidated more functions into the view.<\/p>\n<h4><strong>Creating packages and classes<\/strong><\/h4>\n<p>On project view, you can create package and classes by right-clicking on a source folder. For classes, class template file will be automatically generated.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-large wp-image-227708\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/new-class-1024x653.png\" alt=\"Image new class\" width=\"640\" height=\"408\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/new-class-1024x653.png 1024w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/new-class-300x191.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/new-class-768x490.png 768w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/new-class-1536x979.png 1536w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/new-class-2048x1305.png 2048w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<h4><strong>Building and cleaning workspace<\/strong><\/h4>\n<p>Building workspace supports full build and incremental build.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-large wp-image-227690\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/build-and-clean-workspace-1024x653.png\" alt=\"Image build and clean workspace\" width=\"640\" height=\"408\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/build-and-clean-workspace-1024x653.png 1024w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/build-and-clean-workspace-300x191.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/build-and-clean-workspace-768x490.png 768w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/build-and-clean-workspace-1536x980.png 1536w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/build-and-clean-workspace-2048x1306.png 2048w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<h4><strong>Maven integration<\/strong><\/h4>\n<p>Project view detects Maven project automatically. You can quickly open pom.xml file by clicking the opening icon on your project node.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-large wp-image-227691\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/open-POM-1024x654.png\" alt=\"Image open POM\" width=\"640\" height=\"409\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/open-POM-1024x654.png 1024w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/open-POM-300x192.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/open-POM-768x491.png 768w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/open-POM-1536x981.png 1536w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/open-POM-2048x1308.png 2048w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Run Maven commands by right clicking the project node.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-large wp-image-227692\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/run-maven-commands-1024x652.png\" alt=\"Image run maven commands\" width=\"640\" height=\"408\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/run-maven-commands-1024x652.png 1024w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/run-maven-commands-300x191.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/run-maven-commands-768x489.png 768w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/run-maven-commands-1536x979.png 1536w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/run-maven-commands-2048x1305.png 2048w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Add dependency by clicking the adding icon on Maven Dependencies node.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-large wp-image-227689\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/add-Maven-dep-1024x652.png\" alt=\"Image add Maven dep\" width=\"640\" height=\"408\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/add-Maven-dep-1024x652.png 1024w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/add-Maven-dep-300x191.png 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/add-Maven-dep-768x489.png 768w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/add-Maven-dep-1536x979.png 1536w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2020\/09\/add-Maven-dep-2048x1305.png 2048w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<h3><strong>More improvements<\/strong><\/h3>\n<p>Last but not least, improvements have been made on debugging support, for example, added run and debug buttons onto editor title bar for single file debugging and added new configurations for JDWP. For more details, please refer to <a href=\"https:\/\/marketplace.visualstudio.com\/items\/vscjava.vscode-java-debug\/changelog\">Debugger for Java<\/a>.<\/p>\n<h3>Try it out<\/h3>\n<p>Please don\u2019t hesitate to give it a try! Your feedback and suggestions are very important to us and will help shape our product in future.<\/p>\n<ul>\n<li>Learn more about <a href=\"https:\/\/code.visualstudio.com\/docs\/languages\/java\" target=\"_blank\" rel=\"noopener noreferrer\">Java on Visual Studio Code<\/a>.<\/li>\n<li>Explore our step by step <a href=\"https:\/\/code.visualstudio.com\/docs\/java\/java-tutorial\" target=\"_blank\" rel=\"noopener noreferrer\">Java Tutorials on Visual Studio Code<\/a>.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In this update, we will focus on performance improvements and project management.<\/p>\n","protected":false},"author":26010,"featured_media":227711,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,8,15],"tags":[25,248,26,749,12],"class_list":["post-227683","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","category-open-source","category-vscode","tag-debugging","tag-java","tag-performance","tag-project-management","tag-visual-studio-code"],"acf":[],"blog_post_summary":"<p>In this update, we will focus on performance improvements and project management.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/227683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/users\/26010"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/comments?post=227683"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/227683\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media\/227711"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media?parent=227683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/categories?post=227683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/tags?post=227683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}