Bug 310811 - [perfs] Big regression on FullSourceWorkspaceFormatterTests#testFormatDefaultBigFile()
Summary: [perfs] Big regression on FullSourceWorkspaceFormatterTests#testFormatDefault...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.6 RC1   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 286955
  Show dependency tree
 
Reported: 2010-04-28 09:07 EDT by Frederic Fusier CLA
Modified: 2010-12-27 03:50 EST (History)
4 users (show)

See Also:
Olivier_Thomann: review+


Attachments
Proposed patch (55.81 KB, patch)
2010-05-03 15:48 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 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. ***