Bug 171653 - [index] Java Tooling initialization performance issue after startup
Summary: [index] Java Tooling initialization performance issue after startup
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.3 M6   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
: 150837 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-01-25 06:49 EST by Eric Jodet CLA
Modified: 2007-04-13 05:26 EDT (History)
3 users (show)

See Also:


Attachments
Proposed fix (4.53 KB, patch)
2007-01-25 07:27 EST, Eric Jodet CLA
no flags Details | Diff
Yourkit performance comparison (47.00 KB, image/jpeg)
2007-01-25 09:59 EST, Eric Jodet CLA
no flags Details
Alternate patch on top HEAD (1.89 KB, patch)
2007-01-25 10:24 EST, Eric Jodet CLA
no flags Details | Diff
Ultimate patch to optimize read and write UTF operations (72.67 KB, patch)
2007-02-20 05:13 EST, Frederic Fusier CLA
no flags Details | Diff
Corresponding patch for R3_2_maintenance branch (47.54 KB, patch)
2007-03-28 10:32 EDT, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Jodet CLA 2007-01-25 06:49:40 EST
When opening Eclipse against medium (or big) workspaces (mine has 120 projects),
the Java Tooling initialization task takes a non negligeable amount of time, and is CPU consuming.
This, for example, prevents user from performing an Open Type once Eclipse has been launched, until this task is completed.
Main of the time seems to be spent while reading index files...
This also can be reproduced using 3.3 milestones.
Comment 1 Frederic Fusier CLA 2007-01-25 07:10:32 EST
Philippe, is it ok to target this bug to 3.2.2?
Comment 2 Eric Jodet CLA 2007-01-25 07:27:27 EST
Created attachment 57501 [details]
Proposed fix

This optimization significantly reduces the CPU time used to read index files.
I'll post real measurements ASAP, in order to evaluate the effective gain.
Comment 3 Philipe Mulet CLA 2007-01-25 09:06:08 EST
Candidate for 3.2.2 since fix is trivial and provides significant improvement on startup times.
Comment 4 Eric Jodet CLA 2007-01-25 09:59:21 EST
Created attachment 57504 [details]
Yourkit performance comparison

Attached is a screen shot in which the CPU times are compared:
note that the CPU time for Util::readUTf(DataInput) is divided by 6 with the proposed fix applied.
Comment 5 Eric Jodet CLA 2007-01-25 10:24:56 EST
Created attachment 57505 [details]
Alternate patch on top HEAD

Alternate possible solution regarding the readUTF issue.
Faster (regarding CPU time) than the 1st patch.
Comment 6 Frederic Fusier CLA 2007-01-25 11:27:11 EST
(In reply to comment #2)
> Created an attachment (id=57501) [details]
> Proposed fix
> 
> This optimization significantly reduces the CPU time used to read index files.
> I'll post real measurements ASAP, in order to evaluate the effective gain.
> 
This fix has been released for 3.2.2 in R3_2_maintenance stream.
I keep the bug opened it will be also put in HEAD stream (see comment 5)...
Comment 7 Frederic Fusier CLA 2007-02-20 05:12:00 EST
Change target as final fix was not really put in 3.2.2 stream...
Comment 8 Frederic Fusier CLA 2007-02-20 05:13:38 EST
Created attachment 59356 [details]
Ultimate patch to optimize read and write UTF operations
Comment 9 Frederic Fusier CLA 2007-02-20 05:16:22 EST
Performance tests on this patch results with a gain around 12% for searchAllTypeNames test. Note new specific written test shows a gain around 23% on a searchAllTypeNames request when index category table are not cached.
Comment 10 Frederic Fusier CLA 2007-02-20 07:32:19 EST
(In reply to comment #8)
> Created an attachment (id=59356) [details]
> Ultimate patch to optimize read and write UTF operations
> 
Released for 3.3 M6 in HEAD stream.
Closing for now as FIXED, I reopen it and change the target when I'll release corresponding change in R3_2_maintenance stream...
Comment 11 Frederic Fusier CLA 2007-03-16 06:26:27 EDT
*** Bug 150837 has been marked as a duplicate of this bug. ***
Comment 12 Olivier Thomann CLA 2007-03-20 09:23:34 EDT
Verified for 3.3 M6 using build I20070320-0010
Comment 13 Frederic Fusier CLA 2007-03-26 06:46:51 EDT
Is it OK to backport this fix on R3_2_maintenance stream?
Comment 14 Jerome Lanneluc CLA 2007-03-26 07:56:10 EDT
For now, please just prepare the patch against R3_2_maintenance. We will decide later if this needs to be released to R3_2_maintenance
Comment 15 Frederic Fusier CLA 2007-03-28 10:32:33 EDT
Created attachment 62230 [details]
Corresponding patch for R3_2_maintenance branch

Note that this patch has been done on top of R3_2_maintenance branch which as this time, and for the concerned modified classes, should be equivalent to version v_686_R32x...

Note also that this patch includes fix for bug 138309.
Comment 16 Jerome Lanneluc CLA 2007-04-11 12:41:44 EDT
Patch released in Startup_R32x branch
Comment 17 Jerome Lanneluc CLA 2007-04-12 13:02:46 EDT
(In reply to comment #15)
> Created an attachment (id=62230) [details]
> Corresponding patch for R3_3_maintenance branch
> 
> Note that this patch has been done on top of R3_2_maintenance branch which as
> this time, and for the concerned modified classes, should be equivalent to
> version v_686_R32x...
> 
> Note also that this patch includes fix for bug 138309.
> 
It looks like this patch also includes the fix for bug 174971. Frederic can you please confirm ?
Comment 18 Frederic Fusier CLA 2007-04-13 05:26:00 EDT
(In reply to comment #17)
> It looks like this patch also includes the fix for bug 174971. Frederic can you
> please confirm ?
> 
Yes, I confirm it also includes fix for bug 174791. I didn't precise it as this bug fixed a regression introduced by bug 171653 fix...