|Scoping Performance [message #1847229]
||Wed, 20 October 2021 06:16
| Alfredo Aldundi
Registered: July 2009
I have some scopes that are more expensive to calculate. This leads to hanging editors, especially in larger files. I have some ideas how to tackle the problem and have already experimented a bit with potential solutions, but I have not yet reached a satisfying solution nor am I sure if this is the appropriate way to do it.|
The first idea was to use the IResourceScopeCache to cache the scopes. However, as it turned out the cache is extremely aggressively cleared in a lot of situations, which are unecessary in our case.
- cancelled validation task due to repetitive typing (nothing is cached by validations in our case and even if there would be caching, it would not invalidate the cache)
- reconciling drops and recreates EMF objects which lead to change notifications that clear the cache; in our case, this is useless, because that particular EMF object does not impact scoping at all
Experimentally, I have implemented my own IResourceScopeCache (extending OnChangeEvictingCache) to create my own CacheAdapter to override isSemanticStateChange (return false in the irrelevant cases). This solves the cache clear due to reconciling but not due to cancelled validation task.
My questions are:
- why is a cancelled validation task clearing the cache? Can I disable that somehow?
- how would you approach the performance tuning? Which knobs can I turn to make this faster? Obviously, I will try to tune scope calculation, but this will have its limits
One idea was also to store more information in the index (IResourceDescriptionStrategy). However, this does not help as it is not possible to navigate cross references from there.
PS: a workaround is to split the larger files into smaller ones
Powered by FUDForum
. Page generated in 0.01973 seconds