{"id":34009,"date":"2024-04-18T20:05:26","date_gmt":"2024-04-18T20:05:26","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=34009"},"modified":"2024-04-18T20:05:26","modified_gmt":"2024-04-18T20:05:26","slug":"vs-code-c-extension-1-19-release-faster-go-to-symbol-and-colorization","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/vs-code-c-extension-1-19-release-faster-go-to-symbol-and-colorization\/","title":{"rendered":"VS Code C++ Extension 1.19 Release: 3.6x faster Go To Symbol &#038; 1.5x faster colorization"},"content":{"rendered":"<p><span data-contrast=\"auto\">With our recent <a href=\"https:\/\/github.com\/microsoft\/vscode-cpptools\/releases\/tag\/v1.19.9\">1.19 release<\/a>, performance was our biggest focus for the C++ Extension in Visual Studio Code. This included features like progressive population of IntelliSense results and faster symbol searching. <\/span><span data-contrast=\"none\">With these enhancements, you can begin writing C++ code when opening a file quicker than ever before. Additionally, we also added support for fuzzy results when searching for symbols.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n<h3 aria-level=\"2\"><span data-contrast=\"none\">Faster Go To Symbol Search<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:160,&quot;335559739&quot;:80,&quot;335559740&quot;:279}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">Searching for symbols using the \u201cGo to Symbol in Workspace\u201d command now uses a new algorithm which returns relevant results in a fraction of the time it took previously.\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335557856&quot;:16777215,&quot;335559737&quot;:-20,&quot;335559739&quot;:240,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">This new algorithm uses a full-text-search index of symbols that is maintained on the fly, supporting a variety of search methods to find symbols depending on which will be the fastest way to provide results. The search is handled through several different queries, starting with literal matches and progressively moving towards fuzzy matches. This has also added support for fuzzy search results when searching for symbols.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335557856&quot;:16777215,&quot;335559737&quot;:-20,&quot;335559739&quot;:240,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Through our testing, we found an average 5.8x speedup on MacOS, 2.1x on Linux, and 3.1x on Windows. Testing was done using VS Code 1.86.2 on a low-tier machine and searching for a symbol in the <\/span><a href=\"https:\/\/pytorch.org\/\"><span data-contrast=\"none\">PyTorch source code<\/span><\/a><span data-contrast=\"auto\">.<\/span><\/p>\n<p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335557856&quot;:16777215,&quot;335559737&quot;:-20,&quot;335559739&quot;:240,&quot;335559740&quot;:279}\"> <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/04\/Screenshot-2024-04-16-161327.png\"><img decoding=\"async\" class=\"aligncenter wp-image-34011\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/04\/Screenshot-2024-04-16-161327-1024x618.png\" alt=\"Graph that shows a bar graph split by operating system. For all three operating systems, the 1.19 version is faster by a few seconds compared to the 1.18 version.\" width=\"613\" height=\"370\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/04\/Screenshot-2024-04-16-161327-1024x618.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/04\/Screenshot-2024-04-16-161327-300x181.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/04\/Screenshot-2024-04-16-161327-768x464.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/04\/Screenshot-2024-04-16-161327.png 1212w\" sizes=\"(max-width: 613px) 100vw, 613px\" \/><\/a><\/span><\/p>\n<p><span class=\"TextRun SCXW264022781 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW264022781 BCX8\">Experience this for yourself by upgrading to the <\/span><span class=\"NormalTextRun SCXW264022781 BCX8\">new version<\/span><span class=\"NormalTextRun SCXW264022781 BCX8\"> and using the \u201c<\/span><span class=\"NormalTextRun CommentStart SCXW264022781 BCX8\">Go <\/span><span class=\"NormalTextRun SCXW264022781 BCX8\">t<\/span><span class=\"NormalTextRun SCXW264022781 BCX8\">o<\/span><span class=\"NormalTextRun SCXW264022781 BCX8\"> Symbol<\/span><span class=\"NormalTextRun SCXW264022781 BCX8\"> in Workspace<\/span><span class=\"NormalTextRun SCXW264022781 BCX8\">\u201d command in the command palette<\/span><span class=\"NormalTextRun SCXW264022781 BCX8\">:<\/span><\/span><span class=\"EOP SCXW264022781 BCX8\" data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335557856&quot;:16777215,&quot;335559737&quot;:-20,&quot;335559739&quot;:240,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/04\/GoToSymbolExample.gif\"><img decoding=\"async\" class=\"aligncenter wp-image-34012\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/04\/GoToSymbolExample.gif\" alt=\"A gif that shows a user calling on the command pallete and typing in the go to symbol in workspace command. they tend search for a function name by typing the function name\" width=\"701\" height=\"362\" \/><\/a><\/p>\n<h3 aria-level=\"2\"><span data-contrast=\"none\">Faster Time to Colorization<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:160,&quot;335559739&quot;:80,&quot;335559740&quot;:279}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"none\">When opening a source file with the 1.19 version of the C++ Extension installed, <\/span><a href=\"https:\/\/code.visualstudio.com\/api\/language-extensions\/semantic-highlight-guide\"><span data-contrast=\"none\">semantic highlighting<\/span><\/a><span data-contrast=\"none\"> is now much faster. This change is due to the C++ Extension now providing colorization in increments, starting with the visible area, rather than waiting for an entire file to be analyzed before colorization can begin.\u00a0\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335557856&quot;:16777215,&quot;335559737&quot;:-20,&quot;335559739&quot;:240,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Based on our testing, we found an average 1.5x speedup for time to colorization for Windows, 1.8x for Linux, and 1.2x for MacOS. This testing was done using VS Code 1.86.2\/1.85.2 on a low-tier machine and colorizing a file in the <\/span><a href=\"https:\/\/pytorch.org\/\"><span data-contrast=\"none\">PyTorch source code<\/span><\/a><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335557856&quot;:16777215,&quot;335559737&quot;:-20,&quot;335559739&quot;:240,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n<p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335557856&quot;:16777215,&quot;335559737&quot;:-20,&quot;335559739&quot;:240,&quot;335559740&quot;:279}\"><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/04\/Average_time_to_colorization.png\"><img decoding=\"async\" class=\"aligncenter wp-image-34017\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/04\/Average_time_to_colorization.png\" alt=\"Image that shows a bar graph with the Average time to colorization per operating system. the times for version 1.19 are all faster than 1.18 across the operating system.\" width=\"625\" height=\"378\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/04\/Average_time_to_colorization.png 1174w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/04\/Average_time_to_colorization-300x181.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/04\/Average_time_to_colorization-1024x619.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/04\/Average_time_to_colorization-768x464.png 768w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/a><\/span><\/p>\n<p><span class=\"TextRun SCXW234687376 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW234687376 BCX8\">But what does this difference feel like? Especially when opening large, complex files <\/span><span class=\"NormalTextRun SCXW234687376 BCX8\">you can see the change \u2013 for example,<\/span><span class=\"NormalTextRun SCXW234687376 BCX8\"> the <\/span><\/span><a class=\"Hyperlink SCXW234687376 BCX8\" href=\"https:\/\/www.sqlite.org\/index.html\" target=\"_blank\" rel=\"noreferrer noopener\"><span class=\"TextRun Underlined SCXW234687376 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW234687376 BCX8\" data-ccp-charstyle=\"Hyperlink\">amalgamation source file for SQLite<\/span><\/span><\/a><span class=\"TextRun SCXW234687376 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW234687376 BCX8\"> which is <\/span><span class=\"NormalTextRun CommentStart SCXW234687376 BCX8\">8.8MB<\/span><span class=\"NormalTextRun SCXW234687376 BCX8\">. F<\/span><span class=\"NormalTextRun SCXW234687376 BCX8\">ull colorization<\/span><span class=\"NormalTextRun CommentStart SCXW234687376 BCX8\"> in this windows based example used to <\/span><span class=\"NormalTextRun CommentStart SCXW234687376 BCX8\">take 11 seconds,<\/span><span class=\"NormalTextRun CommentStart SCXW234687376 BCX8\"> now<\/span><span class=\"NormalTextRun SCXW234687376 BCX8\"> it only takes 3 seconds (<\/span><span class=\"NormalTextRun CommentStart SCXW234687376 BCX8\">3.7<\/span><span class=\"NormalTextRun SCXW234687376 BCX8\">x<\/span> <span class=\"NormalTextRun SCXW234687376 BCX8\">faster than<\/span><span class=\"NormalTextRun SCXW234687376 BCX8\"> before!<\/span><span class=\"NormalTextRun SCXW234687376 BCX8\">)<\/span><span class=\"NormalTextRun CommentStart SCXW234687376 BCX8\">:<\/span> <\/span><span class=\"EOP SCXW234687376 BCX8\" data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335557856&quot;:16777215,&quot;335559737&quot;:-20,&quot;335559739&quot;:240,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n<p><div style=\"width: 1920px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-34009-1\" width=\"1920\" height=\"1080\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/04\/ProgressiveIntelliSenseAndColorization.mp4?_=1\" \/><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/04\/ProgressiveIntelliSenseAndColorization.mp4\">https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/04\/ProgressiveIntelliSenseAndColorization.mp4<\/a><\/video><\/div><\/p>\n<p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335557856&quot;:16777215,&quot;335559737&quot;:-20,&quot;335559739&quot;:240,&quot;335559740&quot;:279}\">\u00a0Note that the colorization speedup might vary based various factors such as the machine used, workspace size, and file size.\u00a0<\/span><\/p>\n<h3 aria-level=\"2\"><span data-contrast=\"none\">Other Enhancements\u00a0<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:160,&quot;335559739&quot;:80,&quot;335559740&quot;:279}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"none\">There have been many other enhancements, performance improvements, and bug fixes included in version 1.19. For example, we added several enhancements when adding #includes to a file. To learn more about these changes, please reference the <\/span><a href=\"https:\/\/github.com\/microsoft\/vscode-cpptools\/releases\"><span data-contrast=\"none\">1.19 changelog<\/span><\/a><span data-contrast=\"none\">.\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335557856&quot;:16777215,&quot;335559737&quot;:-20,&quot;335559739&quot;:0,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n<h3 aria-level=\"2\"><span data-contrast=\"none\">What do you think?\u00a0<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:160,&quot;335559739&quot;:80,&quot;335559740&quot;:279}\">\u00a0<\/span><\/h3>\n<p><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode.cpptools\"><span data-contrast=\"none\">Download the C\/C++ extension for Visual Studio Code <\/span><\/a><span data-contrast=\"none\">\u202ftoday, give it a try, and let us know what you think.\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:240,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"none\">If you have any questions around this release, feel free to start a discussion in <\/span><a href=\"https:\/\/github.com\/microsoft\/vscode-cpptools\/discussions\"><span data-contrast=\"none\">our GitHub repository.<\/span><\/a><span data-contrast=\"none\"> Otherwise, if you run into any issues, please report them in the\u202f<\/span><a href=\"https:\/\/github.com\/Microsoft\/vscode-cpptools\/issues\"><span data-contrast=\"none\">issues section<\/span><\/a><span data-contrast=\"none\">. We can be reached via the comments below, per email at\u202f <\/span><a href=\"mailto:visualcpp@microsoft.com\"><span data-contrast=\"none\">visualcpp@microsoft.com,<\/span><\/a><span data-contrast=\"none\"> or through our team on X\/Twitter at \u202f<\/span><a href=\"https:\/\/twitter.com\/visualc\"><span data-contrast=\"none\">@<\/span><\/a><a href=\"https:\/\/twitter.com\/visualc\"><span data-contrast=\"none\">VisualC.<\/span><\/a><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:240,&quot;335559740&quot;:279}\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>With our recent 1.19 release, performance was our biggest focus for the C++ Extension in Visual Studio Code. This included features like progressive population of IntelliSense results and faster symbol searching. With these enhancements, you can begin writing C++ code when opening a file quicker than ever before. Additionally, we also added support for fuzzy [&hellip;]<\/p>\n","protected":false},"author":101195,"featured_media":35994,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,218,275],"tags":[140,274,66,276],"class_list":["post-34009","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus","category-performance","category-visual-studio-code","tag-c","tag-c-extension","tag-performance","tag-vscode"],"acf":[],"blog_post_summary":"<p>With our recent 1.19 release, performance was our biggest focus for the C++ Extension in Visual Studio Code. This included features like progressive population of IntelliSense results and faster symbol searching. With these enhancements, you can begin writing C++ code when opening a file quicker than ever before. Additionally, we also added support for fuzzy [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/34009","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/101195"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=34009"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/34009\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/35994"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=34009"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=34009"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=34009"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}