Autocomplete speeds up in Java on Visual Studio code – Visual Studio magazine
Autocomplete speeds up in Java on Visual Studio code
Java jockeys using Microsoft’s Visual Studio code editor will see faster code completions thanks to a new language server.
âWith the recent version 1.0 of Java Language Server, we have significantly improved the performance of autocomplete,â said Nick Zhu, senior program manager, in a Nov. 24 article describing what’s new in the monthly update. regular (October) Java on VS Code.
This language server – providing language-specific “intelligents” such as code completion in VS Code – was developed in cooperation with Red Hat, resulting in the Language Support for Java (TM) by Red extension. Hat on the VS Code market.
The speed improvements with the new server are said to speed up the three phases of the code completion engine: search the indexer to find proposals; converting proposals into completions; and calculating the proposals for snippets.
âThe table below compares the code completion response time between recent versions,â Zhu continued. “For common scenarios such as type completion and constructor names, code completion performance is significantly improved over previous versions (v0.80, v0.81, and v.0.82).”
Although Zhu said code completion is now much faster, there is still work to be done, with future plans including:
- Lazy resolution textedit: “Since most language clients do not support deferred resolution text editing for completion items, the Java language server must calculate text changes for all completion items in the response d ‘completion. This is the cause of the most expensive calculations. We are working with client authors to explore support for slow-resolution text editing. “
- More efficient indexer: “The current index data is insufficient for some code completion scenarios such as constructor. For example, constructor completion needs to know if the class has generic type arguments and decide whether to add a diamond to the constructor reference. The constructor index table did not include such information about type arguments, we have to resolve them from Java models, which is expensive. We are considering optimizing the index schema to include more information. “
The Red Hat Tool for Java is approaching 13 million installations, making it one of the best extensions out there.
David Ramel is editor and writer for Converge360.