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 for Converge360.

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube