News

Visual Studio Code Python Update Speeds Jupyter Notebook Editor

Faster start-up times for the Jupyter Notebook editor and associated server highlight the February update to the wildly popular Python Extension for Visual Studio Code.

The team improved the performance of the Notebook editor in the January release and continued that effort to make it even faster in the new update. Luciana de Melo e Abud, program manager for the tool, reported 2-3X improvements in speed when opening the Jupyter Notebook editor and in starting up the companion Jupyter server. "First cell execution is also faster as the Jupyter server now spins up in the background automatically when notebooks are opened," she said.

Jupyter Notebooks have been getting a lot of attention in the Microsoft-centric development world lately, as the company's .NET team just recently detailed improvements to the Jupyter-Notebooks-in-.NET-Core experience, what Microsoft calls .NET Notebooks, now in preview.

In the new Python extension update announced Feb. 11, the company also addressed developer feedback about many notifications being thrown when they opened a workspace already configured for VS Code without having an interpreter selected. "Previously, the installation would fail because no interpreter was selected in the workspace," de Melo e Abud said. "In this release, we scaled back the notification prompts for tools installation. They are now only displayed if an interpreter is selected."

As noted in the changelog, the team also closed 66 issues, including two associated with the improvements mentioned above.

A few issues called out for special attention by de Melo e Abud include the following, with thanks shouted out to community contributors:

  • Automatically start the Jupyter server when opening a notebook or the interative window. (#7232)
  • Don't display output panel when building workspace symbols. (#9603)
  • Fix to a crash when using pytest to discover doctests with unknown line number. (thanks Olivier Grisel) (#7487)
  • Update Chinese (Traditional) translation. (thanks pan93412) (#9548)

The VS Code Python program manager also took an opportunity to remind developers of a feature introduced previously that they might have missed.

Jump To Cursor in Animated Action
[Click on image for larger, animated GIF view.]Jump To Cursor in Animated Action (source: Microsoft).

"Although it's not part of the new improvements included in this release, the Python debugger supports a feature that doesn't seem to be widely known: Jump to Cursor," she said. "When you start a debug session and the debugger hits a breakpoint, you can right click on any part of your code – before or after the point where the breakpoint was hit, and select “Jump to Cursor”. This will make the debugger continue its execution from that selected line onward.

"So if you want to execute pieces of code that the debugger had already passed through, you don't need to restart the debug session and wait for the execution to reach that point again. You can simply set it to jump to the line you wish to execute."

The previous work to improve Jupyter functionality in last month's update mentioned by de Melo e Abud included:

  • Kernel selection in Jupyter Notebooks: "In the top right of the Notebook Editor and the Interactive Window, you will now be able to see the current kernel that the notebook is using along with the kernel status (i.e. whether it is idle, busy, etc…). This release also allows you to change your kernel to other Python kernels. To change your current active kernel, click on the current kernel to bring up the VS Code kernel selector and select which kernel you want to switch to from the list."
  • Performance improvements in the Jupyter Notebook editor: "This release includes many improvements to the performance of Jupyter in VS Code in both the Notebook editor and the Interactive Window. This was accomplished through caching previous kernels and through optimizing the search for Jupyter. Some of the significant improvements due to these changes are:

    • Initial starting of the Jupyter server is faster, and subsequent starts of the Jupyter server are more than 2X faster
    • Creating a blank new Jupyter notebook is 2X faster
    • Opening Jupyter Notebooks (especially with a large file size) is now 2x faster

The Python Extension for Visual Studio Code can be installed right from the editor's extension gallery or by downloading it from the Visual Studio Code Marketplace, where it sports an average 4.4 rating (scale to 5) from 298 developers who reviewed it. The extension has now been installed more than 16 million times, making it by far the most popular tool in the extension marketplace.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

  • Telerik UI for Blazor Updated

    Progress announced an update to its Telerik UI for Blazor components, targeting Microsoft's open source Blazor framework that lets C# coders create web apps without having to rely upon JavaScript.

  • Infragistics Unveils UI Components for Blazor

    Infragistics, specializing in third-party UI/UX controls and tools, unveiled a new offering targeting Blazor, Microsoft's red-hot open source framework that allows for C#-based web development instead of traditional mainstay JavaScript.

  • AWS Open Sources Tool for Porting .NET Framework Apps to .NET Core

    Leading cloud computing platform Amazon Web Services open sourced the it announced in July for helping users port old .NET Framework applications to the new .NET Core framework.

  • Uno Platform Ports Windows Calculator to Linux

    Uno Platform has ported the famed Windows Calculator, open sourced last year, to Linux as part of a continuing "proof point" effort to demonstrate the reach of what it describes as the sole UI offering available to target Windows, WebAssembly, iOS, macOS, Android and Linux with single-codebase applications coded in C# and XAML.

  • ASP.NET Core OData 8 Preview Supports .NET 5, but with Breaking Changes

    ASP.NET Core OData, which debuted in July 2018, is out in a v8.0 preview that for the first time supports the upcoming .NET 5 milestone release.

Upcoming Events