Community
Participate
Working Groups
This is related to bug 550662 but it is about a different optimization opportunity. I was able to identify a problem in getComputedStyle and the ExtendedSelectors. The problem is that they are calling getParentNode() in each match() call, in my case, one click which populates a view for the first time can cause 350000+ calls to match(). I was able to come up with a solution that is API safe (With a default API that would fall back to historical behavior). The time with my solution, in my scenario calling getComputedStyle exactly 869 times is reduced from 2.507s to 0.961s. Basically my solution is to avoid calling getParentNode() in selector code by computing an array of parent nodes in getParentNode, and passing that, plus an index to match. I will provide a Gerrit.
New Gerrit change created: https://git.eclipse.org/r/160947
Good catch, Mike. The patch looks promising.
Gerrit change https://git.eclipse.org/r/160947 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=5a0d9a62223ed910937d297c951211e2433c4007
Nice work!