Bug 79322 - create unit tests with this file
Summary: create unit tests with this file
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.sse (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P4 enhancement (vote)
Target Milestone: Future   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted, performance
Depends on:
Blocks:
 
Reported: 2004-11-23 13:31 EST by Phillip Avery CLA
Modified: 2010-04-26 10:55 EDT (History)
5 users (show)

See Also:


Attachments
the zipped test file. (55.93 KB, application/zip)
2005-04-02 03:10 EST, Panagiotis Korros CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Phillip Avery CLA 2004-11-23 13:31:03 EST
I'm not sure when this started (I saw on 3.1M3) but there is a huge performance
problem with typing in a large xml file (1M), something blocks the UI 
thread and the workbench appears hung.

Just type anywhere and the UI gets stuck.

When I pause the VM, it seems like this is where most of the time is spent
on the main thread:

GenericPositionManager.removePosition(String, Position) line: 347
JobSafeStructuredDocument(BasicStructuredDocument).removePosition(String,
Position) line: 2130
DefaultPartitioner.documentChanged2(DocumentEvent) line: 338
DefaultPartitioner.documentChanged(DocumentEvent) line: 202
JobSafeStructuredDocument(BasicStructuredDocument)._fireDocumentChanged(Object[],
StructuredDocumentEvent) line: 403
JobSafeStructuredDocument(BasicStructuredDocument).fireStructuredDocumentEvent(RegionChangedEvent)
line: 1176
JobSafeStructuredDocument(BasicStructuredDocument).internalReplaceText(Object,
int, int, String, boolean) line: 1836
JobSafeStructuredDocument(BasicStructuredDocument).replaceText(Object, int, int,
String, boolean) line: 2236
JobSafeStructuredDocument.access$0(JobSafeStructuredDocument, Object, int, int,
String, boolean) line: 1
JobSafeStructuredDocument$1.run() line: 100
EditorExecutionContext.execute(Runnable) line: 43
JobSafeStructuredDocument.replaceText(Object, int, int, String, boolean) line: 110
JobSafeStructuredDocument(BasicStructuredDocument).replaceText(Object, int, int,
String) line: 2232
StructuredDocumentToTextAdapter.replaceTextRange(int, int, String) line: 1118
StyledText.modifyContent(Event, boolean) line: 5608
StyledText.sendKeyEvent(Event) line: 6448
StyledText.doContent(char) line: 2537
StyledText.handleKey(Event) line: 4980
StyledText.handleKeyDown(Event) line: 5003
StyledText$7.handleEvent(Event) line: 4748
EventTable.sendEvent(Event) line: 82
StyledText(Widget).sendEvent(Event) line: 800
StyledText(Widget).sendEvent(int, Event, boolean) line: 824
StyledText(Widget).sendEvent(int, Event) line: 809
StyledText(Widget).sendKeyEvent(int, int, int, int, Event) line: 837
StyledText(Widget).sendKeyEvent(int, int, int, int) line: 833
StyledText(Widget).wmChar(int, int, int) line: 1096
StyledText(Control).WM_CHAR(int, int) line: 3077
StyledText(Control).windowProc(int, int, int, int) line: 2987
Display.windowProc(int, int, int, int) line: 3361
OS.DispatchMessageW(MSG) line: not available [native method]
OS.DispatchMessage(MSG) line: 1502
Display.readAndDispatch() line: 2446
Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 1529
Workbench.runUI() line: 1500
Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 276
PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 144
IDEApplication.run(Object) line: 102
PlatformActivator$1.run(Object) line: 335
EclipseStarter.run(Object) line: 273
EclipseStarter.run(String[], Runnable) line: 129
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available
[native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 85
NativeMethodAccessorImpl.invoke(Method, Object, Object[]) line: 58
DelegatingMethodAccessorImpl.invoke(Method, Object, Object[]) line: 60
Method.invoke(Object, Object[]) line: 391
Main.basicRun(String[]) line: 185
Main.run(String[]) line: 704
Main.main(String[]) line: 688

I don't know off the bat why we get stuck here
Need more investigation.
I can also supply a test file if necessary.
Comment 1 Panagiotis Korros CLA 2004-12-01 05:58:04 EST
I have the same problem all the time. The systems hangs and I need to kill
eclipse. My xml file is ~900kb. I could send it as a test case.
Comment 2 David Williams CLA 2005-03-31 10:56:12 EST
Not sure why I haven't seen this bug report till now!

Panagiotis, a test file would be helpful. Even more helpful would
be a JUnit test, using the performance monitor, etc. (Should be some
exisiting examples in our "..performance.tests" plugins.)
Comment 3 Panagiotis Korros CLA 2005-04-02 03:10:22 EST
Created attachment 19474 [details]
the zipped test file.
Comment 4 Panagiotis Korros CLA 2005-04-02 03:13:31 EST
I tested again today with Eclipse 3.1 I20050401-1645 on windows with WTP M3
installed.

I can't reproduce the problem anymore.

Comment 5 David Williams CLA 2005-04-02 03:28:43 EST
Well, if you don't see any more, I'll lower priority, but will leave open for
now because I hope we can still incorporate it in some test cases. Is
interesting because it not only has lots of elements, but lots of character
enties and in past, we sometimes have had worse performance with that time of file. 

Thanks.
Comment 6 David Williams CLA 2005-05-30 23:35:33 EDT
Changing to 'enhancement' to better reflect its current status, of wanting 
to create JUnit performance tests using a specific file. 

Comment 7 Peter Liu CLA 2009-05-06 12:17:32 EDT
Hi, everyone.
Would someone comment on the status of this bug? Is the enhancement going to be
useful for the stable builds in the very near future?

Peter.
Comment 8 David Carver CLA 2009-07-13 18:45:40 EDT
This might be fixed with the latest changed that have gone in to the XML editors.  I'll see if I can replicate the issue.

Comment 9 David Carver CLA 2009-07-13 18:48:30 EDT
I think this one can be closed now.  I experienced no slow downs, or long pauses while typing.  Content assistance can back within a reasonable amount of time as well.
Comment 10 Ian Tewksbury CLA 2010-03-12 09:14:08 EST
(In reply to comment #9)
> I think this one can be closed now.  I experienced no slow downs, or long
> pauses while typing.  Content assistance can back within a reasonable amount of
> time as well.

I second that motion.
Comment 11 Nick Sandonato CLA 2010-04-26 10:55:53 EDT
Resolving based on comments and observation.