You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/07/01 18:24:12 UTC
[GitHub] [netbeans] matthiasblaesing commented on pull request #4313: Improve performance of JS implementation of AlternativeLocationImpl
matthiasblaesing commented on PR #4313:
URL: https://github.com/apache/netbeans/pull/4313#issuecomment-1172605641
@Chris2011 please have a look at this. You provided a self profiling of the IDE when invoking goto declaration. You observed a pseudo hang (the GUI was blocked, but recovered after some time). Looking at the data verifies this:

On the EDT `GoToSupport#chooseAlternative` is called. This fetches the possible declaration locations and sorts these. In the profile it is visible, that around 80% of the time is spend inside `DeclarationFinderImpl$AlternativeLocationImpl.compareTo()`, which uses `DeclarationFinderImpl$AlternativeLocationImpl.getStringLocation()` as basis for comparison. `getStringLocation` reads the JS file to calculate the line number from the raw offset and is not cached.
I only tested with the build-in stubs, but already saw a runtime reduction of the call from around 4s for 10 calls to 1s for 10 calls. Please test if this improves the situation for you. Bigger projects and/or slow drives can significantly increase runtime.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists