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

Performance optimization #68

Closed
AlexPl292 opened this issue Sep 8, 2021 · 4 comments
Closed

Performance optimization #68

AlexPl292 opened this issue Sep 8, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@AlexPl292
Copy link

Hi, thank you for the great plugin!
I have a large project with a lot of modules and opened branches of the tries. Also, this project has a lot of facets. I've noticed that I see a pretty visible glitches in the project tree. After a small (and not really deep) investigation, I've found that you're collecting all the facts of all the modules on each icon resolution. That seems not very effective at first glance, so maybe you could cache the list of the facets? This is especially interesting because, as far as I understand, there are no default rules that use facets, so they aren't actually used in most cases.
Also, the double for inside of lermitage.intellij.extra.icons.ModelCondition#check also seems a little bit slow, so maybe you could just collect the names of facets in small letters and use the power of set?

Thank you in advance!

@jonathanlermitage
Copy link
Owner

Thx!
Excellent idea, I will implement these improvements.

@jonathanlermitage jonathanlermitage self-assigned this Sep 8, 2021
@jonathanlermitage jonathanlermitage added the enhancement New feature or request label Sep 8, 2021
@jonathanlermitage
Copy link
Owner

It should be fixed now. Can you please make a try with attached plugin file? Thx! @AlexPl292
Extra Icons-1.61.0.203.zip

@AlexPl292
Copy link
Author

Oh, yeah, this seems to be better. I still see some glitches, but they seem to be a platform issue (since it's reproduced with the disabled plugin). Anyway, YourKit shows a nice improvement :)
Also, in case you're looking for the way of this cache invalidation, com.intellij.facet.ProjectFacetListener should help you.

Thank you for the update!

@jonathanlermitage
Copy link
Owner

Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants