Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve code lens provider performance #11696

Merged
merged 5 commits into from
Oct 20, 2022
Merged

improve code lens provider performance #11696

merged 5 commits into from
Oct 20, 2022

Conversation

amunger
Copy link
Contributor

@amunger amunger commented Oct 18, 2022

for #11433

When looking at a large file with many code lenses, most of the code lens provider's is spent creating the code lens objects that are returned, and resulting gc calls. Even more is spent serializing those objects for the response, but that is outside the extension's scope.

This change focuses on speeding up the iteration through code lens range, reducing the getDocument and localize calls.

Parsing the file itself to divide it into cells isn't that large of an impact, so I didn't spend the time implementing a more complex incremental update.

@rebornix
Copy link
Member

It was probably not introduced in this PR but the check for text document uris seem wrong.

@codecov-commenter
Copy link

codecov-commenter commented Oct 19, 2022

Codecov Report

Merging #11696 (6ca094a) into main (903b39e) will increase coverage by 0%.
The diff coverage is 85%.

@@          Coverage Diff           @@
##            main   #11696   +/-   ##
======================================
  Coverage     59%      60%           
======================================
  Files        483      483           
  Lines      34447    34498   +51     
  Branches    5601     5609    +8     
======================================
+ Hits       20668    20703   +35     
- Misses     11827    11841   +14     
- Partials    1952     1954    +2     
Impacted Files Coverage Δ
src/interactive-window/editor-integration/types.ts 100% <ø> (ø)
src/telemetry.ts 7% <0%> (-1%) ⬇️
...teractive-window/editor-integration/codewatcher.ts 70% <75%> (-1%) ⬇️
...tive-window/editor-integration/codelensprovider.ts 78% <83%> (+<1%) ⬆️
...ctive-window/editor-integration/codeLensFactory.ts 91% <87%> (+1%) ⬆️
...ow/editor-integration/pythonCellFoldingProvider.ts 81% <100%> (+1%) ⬆️
...ernels/jupyter/session/requestAgentCreator.node.ts 60% <0%> (-40%) ⬇️
...s/controllers/kernelRanking/kernelRankingHelper.ts 70% <0%> (-9%) ⬇️
.../notebooks/controllers/controllerDefaultService.ts 69% <0%> (-5%) ⬇️
...nels/jupyter/session/jupyterRequestCreator.node.ts 53% <0%> (-4%) ⬇️
... and 15 more

@amunger amunger merged commit 8b8f330 into main Oct 20, 2022
@amunger amunger deleted the aamunger/codeLensPerf branch October 20, 2022 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants