Community
Participate
Working Groups
Created attachment 143410 [details] Simple patch to fix the unneccessary expensive inner loop operation. Build ID: I20090611-1540 Steps To Reproduce: 1. Create a large Java project with many jars in the classpath (on the order of 1000-2000) 2. Add a breakpoint somwehere 3. Debug When it hits the breakpoint, it can take around 10s to move to the line in the source, and subsequent jumps between lines are equally expensive. More information: Profiling showed that creating new Path objects is relatively expensive due to calculating the hashcode and other initialization. The translate+getPackageFragmentRoot methods in JavaSourceLookupUtil is O(n^2) on the number of jars in the classpath. So with 2000 jars, it will create 4 million Path objects. A simple patch is attached which eliminates the major inner loop expense, but this should probably be re-written with some map lookups instead of loop lookups someday.
review during 3.6
(In reply to comment #1) > review during 3.6 this is a really bad bug for us at Google. Can you please get this patch into a 3.5.1 or 3.5.2 release?
It's too late for 3.5.1 (RC4 build for the platform is today). We can consider 3.5.2.
(In reply to comment #3) > It's too late for 3.5.1 (RC4 build for the platform is today). We can consider > 3.5.2. Thanks. Please do consider this for 3.5.2. It's a really nasty regression for us.
Applied patch to HEAD. Marking as 3.5.2 candidate. Note that this is not technically a regression in 3.5 - the same code has existed since 3.2.
Applied to 3.5 maintenance branch. Fixed. Please verify, Mike.
looks good.