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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
