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

Why is bracket BracketPairsTextModelPart passed into TokenizationTextModelPart? #163231

Closed
Tyriar opened this issue Oct 10, 2022 · 2 comments
Closed
Assignees

Comments

@Tyriar
Copy link
Member

Tyriar commented Oct 10, 2022

Part of #161622 - trying to defer bracket pairs evaluation so it doesn't impact input latency, that's harder with the current dependency graph.

It looks like it only does things when events fire:

this._bracketPairs = this._register(new BracketPairsTextModelPart(this, this._languageConfigurationService));
this._guidesTextModelPart = this._register(new GuidesTextModelPart(this, this._languageConfigurationService));
this._decorationProvider = this._register(new ColorizedBracketPairsDecorationProvider(this));
this._tokenizationTextModelPart = new TokenizationTextModelPart(
this._languageService,
this._languageConfigurationService,
this,
this._bracketPairs,
languageId
);

Instead of TokenizationTextModelPart using it, can BracketPairsTextModelPart use TokenizationTextModelPart? ie.

this._bracketPairs = this._register(new BracketPairsTextModelPart(this, this._tokenizationTextModelPart, this._languageConfigurationService));

I can make the change, just want some guidance.

@hediet
Copy link
Member

hediet commented Oct 11, 2022

See 43cf81a

I think this is because of event ordering issues (@alexdima).

@Tyriar
Copy link
Member Author

Tyriar commented Oct 12, 2022

After our chat it doesn't look like we'll be able to defer this to after keypress, so closing this off as this change was so I could experiment with doing that conveniently.

This may still be a valid debt item but I'll leave that up to you.

@Tyriar Tyriar closed this as completed Oct 12, 2022
@Tyriar Tyriar removed this from the October 2022 milestone Oct 12, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants