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

Cell language indicator is slow to appear #148220

Closed
roblourens opened this issue Apr 26, 2022 · 4 comments
Closed

Cell language indicator is slow to appear #148220

roblourens opened this issue Apr 26, 2022 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release notebook-statusbar verified Verification succeeded
Milestone

Comments

@roblourens
Copy link
Member

  • Open a notebook
  • Scroll down
  • See that the language indicator appears after a noticeable delay

I think this is because the providers are stuck on the debounced language detection provider, @JacksonKearl. I think I see a way to improve it, I'll look into it

@roblourens roblourens added bug Issue identified by VS Code Team member as probable bug notebook-statusbar labels Apr 26, 2022
@roblourens roblourens added this to the April 2022 milestone Apr 26, 2022
@roblourens roblourens self-assigned this Apr 26, 2022
@JacksonKearl
Copy link
Contributor

I actually have a fix rn (for #148196), so I should be able to take it

@roblourens
Copy link
Member Author

Will the await this._languageDetectionService.detectLanguage be slow? If so, it's possible to do that in the background then fire the provider's change event. I just wrote a fix that works that way and can show you if you think we need it.

@JacksonKearl
Copy link
Contributor

It's around 100ms with the old model and 1ms with the new one. Did you see fix I put in for the other issue?

@rebornix rebornix removed their assignment Apr 28, 2022
@TylerLeonhardt TylerLeonhardt modified the milestones: April 2022, May 2022 Apr 29, 2022
@roblourens
Copy link
Member Author

Recording 2022-05-03 at 12 49 55

Still slow for me

@JacksonKearl JacksonKearl modified the milestones: May 2022, April 2022 May 3, 2022
@JacksonKearl JacksonKearl added the candidate Issue identified as probable candidate for fixing in the next release label May 3, 2022
@JacksonKearl JacksonKearl self-assigned this May 3, 2022
JacksonKearl pushed a commit that referenced this issue May 3, 2022
* Default to only show language detection hints in text editors
Fixes #148220

* Update to object-based config

* Clarify type of untitled editor
@joyceerhl joyceerhl added the verified Verification succeeded label May 4, 2022
JacksonKearl pushed a commit that referenced this issue May 5, 2022
* Default to only show language detection hints in text editors
Fixes #148220

* Update to object-based config

* Clarify type of untitled editor
JacksonKearl pushed a commit that referenced this issue May 5, 2022
* Default to only show language detection hints in text editors (#148663)

* Default to only show language detection hints in text editors
Fixes #148220

* Update to object-based config

* Clarify type of untitled editor

* Limit detection to modified cells, once per second

* Re-enable in notebooks
@github-actions github-actions bot locked and limited conversation to collaborators Jun 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release notebook-statusbar verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

7 participants
@roblourens @rebornix @TylerLeonhardt @JacksonKearl @greazer @joyceerhl and others