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

Suggest should not force tokenization in very large files #32508

Closed
5 of 6 tasks
rebornix opened this issue Aug 14, 2017 · 2 comments
Closed
5 of 6 tasks

Suggest should not force tokenization in very large files #32508

rebornix opened this issue Aug 14, 2017 · 2 comments
Assignees
Labels
editor-core Editor basic functionality
Milestone

Comments

@rebornix
Copy link
Member

rebornix commented Aug 14, 2017

Related to #21564 and #30181 .

When we open a large file (or whose tokenization takes a long time), any feature that requires accurate token information runs model.forceTokenization and it blocks the UI, including

  • Paste (Auto Indent checks token info)
  • Enter (Enter rules or Indentation)
  • Type
    • (Auto Indent or electric chars)
    • Suggest (Suggestion and Snippet)
    • Others ?

Paste/Enter/Type relies on indentation/enter rules, right now I skipped the smart features if the tokenization is not yet ready for selections. But speaking of suggestions, some suggestion provider (like snippet) requires language id at position, some (quickSuggestions) requires token info, these two force tokenization for selection, which would lead to UI blocking.

Enable quick suggestion and snippet (default)

typeblock

Disable both of them by "editor.quickSuggestions": false, "editor.snippetSuggestions": "none"

typenoblock

Any component that requires token/language info can lead to the UI blocking when users open a large file and modify real quick. As we increase the file size limit for tokenization, this may happen more often. cc @alexandrudima @jrieken @ramya-rao-a

@vscodebot vscodebot bot added editor editor-autoindent Editor auto indentation issues labels Aug 14, 2017
@rebornix rebornix added editor-core Editor basic functionality and removed editor-autoindent Editor auto indentation issues labels Aug 14, 2017
@alexdima
Copy link
Member

@alexdima alexdima removed their assignment Aug 19, 2017
@rebornix
Copy link
Member Author

@alexandrudima thanks!

@rebornix rebornix added this to the August 2017 milestone Aug 19, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-core Editor basic functionality
Projects
None yet
Development

No branches or pull requests

2 participants