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

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

Subscribe on YouTube

Upcoming Training Events