Bug 310811

Summary: [perfs] Big regression on FullSourceWorkspaceFormatterTests#testFormatDefaultBigFile()
Product: [Eclipse Project] JDT Reporter: Frederic Fusier <frederic_fusier>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3 CC: jarthana, Olivier_Thomann, satyam.kandula, sergey.yevtushenko
Version: 3.6Flags: Olivier_Thomann: review+
Target Milestone: 3.6 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 286955    
Attachments:
Description Flags
Proposed patch none

Description Frederic Fusier CLA 2010-04-28 09:07:15 EDT
Verifying performances for 3.6M7 candidates builds, I observed a big regression on formatter tests FullSourceWorkspaceFormatterTests#testFormatDefaultBigFile(): around -30%!

Note that there's a similar regression on testFormatDefault() but less visible.
Comment 1 Frederic Fusier CLA 2010-04-28 09:08:55 EDT
99.99% chance that this regression is a consequence of the fix for bug 59891...

I see if something can be done for RC1...
Comment 2 Frederic Fusier CLA 2010-05-03 15:48:01 EDT
Created attachment 166863 [details]
Proposed patch

This patch adds to performance improvements:
1) It disable the fix for bug 59891 in the case when there are a string concatenation inside the message send. In the peculiar case of the formatter perf test showing the regression, there are tons of this with complex string concatenation and the formatter can raise until 280 AlignmentException before getting a formatted string... Relaxing the previous fix for that does not have any impact on the massive formatter tests which confirms that the performance was really a corner case!
2) It tries to reduce the instanciation of StringBuffer to avoid unnecessary time and garbaged memory consuming.

Point 1) reduce the regression of around 75% and 2) around 25%, which means that with this patch we get back to M6 performance levels for our peculiar perf test case.
Comment 3 Frederic Fusier CLA 2010-05-03 15:50:04 EDT
Olivier, please review, thanks
Comment 4 Olivier Thomann CLA 2010-05-03 21:47:18 EDT
+1
Comment 5 Frederic Fusier CLA 2010-05-04 05:11:44 EDT
(In reply to comment #2)
> Created an attachment (id=166863) [details]
> Proposed patch
> 
Released for 3.6RC1 in HEAD stream
Comment 6 Satyam Kandula CLA 2010-05-17 06:12:55 EDT
There is still 8% performance degradation but it is much better than 30%. Hence verifying. 

Verified for 3.6RC1 using build I20100513-150
Comment 7 Jay Arthanareeswaran CLA 2010-05-17 06:15:44 EDT
Verified.
Comment 8 Frederic Fusier CLA 2010-12-27 03:50:42 EST
*** Bug 230188 has been marked as a duplicate of this bug. ***