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

Revisit label service usages for memoizing results #79742

Closed
bpasero opened this issue Aug 24, 2019 · 2 comments
Closed

Revisit label service usages for memoizing results #79742

bpasero opened this issue Aug 24, 2019 · 2 comments
Assignees
Labels
debt Code quality issues

Comments

@bpasero
Copy link
Member

bpasero commented Aug 24, 2019

I think recently we changed FileEditorInput to no longer cache the result of name and description but to always compute it when needed. It seems the label service has become quite complex with regards to finding the correct formatter.

My assumption is that a label will only change if more formatters get registered, so can we maybe restore the cached labels and flush them when formatters change? This could even become a utility thing that everyone can adopt that wants this kind of caching.

The rationale here is that with many editors open, there can be a lot of calls to this service and I worry we do a bit too much each time because we do not trust the previous result.

@bpasero bpasero added the debt Code quality issues label Aug 24, 2019
@isidorn isidorn added this to the September 2019 milestone Aug 26, 2019
@isidorn
Copy link
Contributor

isidorn commented Aug 26, 2019

Yes, we changed the FileEditorInput to not cache the results.
Droping the cache on new formatters makes sense. Assigning to next milestone and debt week to investigate then.

@bpasero
Copy link
Member Author

bpasero commented Sep 24, 2019

Thanks!

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues
Projects
None yet
Development

No branches or pull requests

2 participants