Bug 190810

Summary: [projection] Format operation is slow on big file when Folding is enabled
Product: [Eclipse Project] JDT Reporter: David Audel <david_audel>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.3Keywords: performance
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Bug Depends on: 249511    
Bug Blocks:    
Attachments:
Description Flags
Fix
none
Updated Fix none

Description David Audel CLA 2007-06-04 09:54:41 EDT
build 3.3RC3

1) Enable Folding (Preferences>Java>Editor>Folding)
2) Open org.eclipse.jdt.core.tests.compiler.regression.GenericTypeTest
3) Format this file
The source is formatted after 40sec

If i disable Folding and do the same test case then the source is formatted after 8sec

Folding seems to be very costly in this test case.
Perhaps performance of Folding could be improved.
Comment 1 Dani Megert CLA 2007-06-04 10:00:42 EDT
- How big is the file? I don't have the JDT Core tests loaded.
- Once it is formatted, how long does disable and then enable folding take?

Also, can you check whether this is a regression compared to 3.2? Thanks!
Comment 2 David Audel CLA 2007-06-04 10:56:40 EDT
I noticed the problem when i verified bug 189456.

GenericTypeTest is a very big file:
- 38000 line of code
- 1200 methods

Once it is formatted disable and enable Folding took around 1sec.

It doesn't seem to be a regression. In 3.2.2 it took 100sec when Folding is enabled and 70 sec when disabled.


Comment 3 Dani Megert CLA 2008-06-18 08:54:22 EDT
I will at least fix the difference between projection on and off. This is something we can deal with.
Comment 4 Dani Megert CLA 2008-06-18 10:45:51 EDT
Created attachment 105292 [details]
Fix

This prevents the projection viewer and semantic highlighting presenter from updating while formatting large documents. Now time is mainly spent in formatter ;-)
Comment 5 Dani Megert CLA 2008-07-31 10:54:21 EDT
Fixed in HEAD.
Available in builds > N20080730-2000.
Comment 6 Dani Megert CLA 2008-10-02 11:35:19 EDT
I have to reopen this because every quick fix and every save with enabled clean ups now runs through that code and this leads to unwanted expansion of folded items. We have to defer the fix until bug 249511 is fixed.
Comment 7 Dani Megert CLA 2008-10-03 11:21:26 EDT
Created attachment 114200 [details]
Updated Fix
Comment 8 Eclipse Genie CLA 2020-03-31 13:30:57 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.