Bug 215638 - [reconciling] Editing large units causes some user actions to be delayed
Summary: [reconciling] Editing large units causes some user actions to be delayed
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate, performance
Depends on:
Blocks:
 
Reported: 2008-01-17 07:13 EST by Philipe Mulet CLA
Modified: 2008-01-21 05:43 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2008-01-17 07:13:06 EST
Build 3.4M4

I have a unit (GenericTypeTest) which is huge. I just edited it in various places to remove some try-catch blocks, and each time I was performing a change, I had to wait a little bit before I could select another method in outline, or a different marker in problem view (pointed at another area of the same unit).

It feels that reconcile is getting in the way. I wonder if editor couldn't be more resilient to big files.
For instance, maybe the reconcile delay could be made longer if the file is so big, i.e. be more dynamic, could be based on how long first reconcile took...

Currently, when these delays occur, it feels like the IDE is not responsive at times, which is annoying.
Comment 1 Dani Megert CLA 2008-01-17 10:30:23 EST
We have to exactly investigate why it's waiting. Dynamically tweaking the reconciler delay might be an interesting thing to investigate.
Comment 2 Philipe Mulet CLA 2008-01-18 03:28:58 EST
Agreed, I cc'ed Jerome since something bad could be occurring in JDT/Core. I am suspecting that we do some linear search which are expensive once you have over 1200 methods...
Comment 3 Jerome Lanneluc CLA 2008-01-21 05:43:16 EST
From my investigations, ICompilationUnit#reconcile(...) reacts in less than 150ms in the case of GenericTypeTest. To monitor this scenario, I added a progress monitor to the reconcile operation:

		monitor = new NullProgressMonitor() {
			int count = 0;
			long lastIsCancelled = System.currentTimeMillis();
			public boolean isCanceled() {
				++this.count;
				int debug = this.count;
				long current = System.currentTimeMillis();
				long time =  current - this.lastIsCancelled;
				if (time > 80)
					System.out.println("isCancelled #" + debug + " took " + time + "ms");
				this.lastIsCancelled = current;
				return false;	
			}
		};