News

Auto Completions Speed 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 1.0 release of the Java Language Server, we have made substantial improvement on the performance of auto-completion," said Nick Zhu, senior program manager, in a Nov. 24 post outlining what's new in the regular monthly update (October) of Java on VS Code.

That language server -- providing language-specific "smarts" such as code completion in VS Code -- was developed in cooperation with Red Hat, resulting in the Language Support for Java(TM) by Red Hat extension in the VS Code marketplace.

Speed improvements with the new server were said to boost all three phases of the code completion engine: searching the indexer to find proposals;converting proposals into completion items; and calculating code snippet proposals.

"The chart below compares the code completion response time between recent versions," Zhu continued. "For common scenarios such as completing types and constructor names, the code completion performance is improved significantly compared to previous versions (v0.80, v0.81 and v.0.82)."

Code Completion Improvements
[Click on image for larger view.] Code Completion Improvements (source: Microsoft).

Although Zhu said code completion was now a lot faster, there is more work to be done, with future plans including:

  • Lazy Resolve TextEdit: "Since most language clients don't support lazy resolve text edit for the completion items, the Java language server must calculate the text edits for all completion items in the completion response. This is the cause of most expensive calculations. We're collaborating with the client authors to explore the support for lazy resolving text edit."
  • More Efficient Indexer: "Current index data is insufficient for some code completion scenarios such as constructor. For example, the constructor completion needs to know whether the class has generic type arguments and decide whether to add a diamond <> to the constructor reference. The constructor index table hasn't included such type argument info, we have to resolve them from Java models, which is expensive. We're considering optimizing the index schema to include more information."

The Red Hat for Java tool is nearing 13 million installations, making it one of the top extensions in the marketplace.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube