| 
| Bad performance of XML Schema Editor [message #115933] | Mon, 04 July 2005 16:28  |  | 
| Eclipse User  |  |  |  |  | Hello, 
 is there any reason for slow performance of Graph page of XML Schema Editor ?
 Anytime i click on graph page (or when i expand some subitem in graph), the
 CPU is used at 90% for around a 30-60 secs by Eclipse (and Eclipse looks like
 freezed). This makes graphical XML Schema editor unusable.
 
 Eclipse 3.1 (built from source on Gentoo Linux), WTP 0.7M5.
 
 Frantisek Augusztin
 |  |  |  | 
|  | 
|  | 
|  | 
|  | 
|  | 
|  | 
|  | 
| 
| Re: Bad performance of XML Schema Editor [message #118849 is a reply to message #116555] | Sat, 09 July 2005 12:05  |  | 
| Eclipse User  |  |  |  |  | Hello, 
 So, I eventually got around profiling the workbench with my XML schema
 open.
 It actually took me a while because I had to do my own porting of eclipse
 profiler plugin (Konstantin Scheglov's) to Eclipse 3.1.
 
 First of all I want to say that if I use a normal, simple XML schema,
 everything works fine.
 That is, as soon as the XSD is loaded and validated, the CPU counters
 freeze.
 
 On the other hand, if I load my XSD (a valid one, if I'm to believe the
 validator and XMLS[lop]py), then things start to go wrong.
 First of all, the CPU keeps working even if I only loaded the file in the
 editor. I don't even edit it.
 Here are a few conclusions from eclipse profiler
 - Only one worker thread is to blame.
 - This thread execute in continuation the
 org.eclipse.wst.sse.ui.internal.reconcile.DirtyRegionProcess or#run
 
 If I follow the path of the most CPU hungry calls I drill down as follows.
 I've added the number of invocations counted by Eclipse Profiler so that
 one understands where the 'gap' lies, percentage are CPU% for that thread.
 
 
 100% 1 invocation -
 org.eclipse.wst.sse.ui.internal.reconcile.DirtyRegionProcess or#run
 100% 1 invocation -
 org.eclipse.wst.sse.ui.internal.reconcile.StructuredRgionPro cess.process
 87% 66 invocations -
 org.eclipse.wst.sse.ui.internal.reconcile.AbstractStructured TextReconcilingStrategy#reconcile
 87% 66 invocations -
 org.eclipse.wst.sse.ui.internal.validation.ReconcileStepForM arkup#reconcileModel
 66% 66 invocations -
 org.eclipse.wst.sse.ui.internal.validation.ReconcileStepForM arkup#getStructuredDocumentRegions
 65% 236783 invocations -
 org.eclipse.wst.xml.core.internal.document.DOMModelIml#getIn dexedRegion
 
 So I guess there is something wrong in
 ReconcileStepForMarkup#getStructuredDocumentRegions that results in never
 returning.
 
 So I got into the src code and I found this bit.
 I don't know the context but I wonder when you get out of this loop.
 Could that be it ?
 
 while (sdRegion != null
 && !sdRegion.isDeleted()
 && xmlNode != null
 && sdRegion.getEndOffset() <= xmlNode.getEndOffset()) {
 if (!sdRegion.isDeleted())
 regions.add(sdRegion);
 sdRegion = sdRegion.getNext();
 xmlNode = getXMLNode(sdRegion);
 }
 
 Hope this helps to make this very nice XSD editor more usable ;-)
 
 If you need my XSD or assistance with the Eclipse Profiler plugin
 (it's very powerful but, having been developed for Eclipse version 2, it's
 aging a bit), please fee free to send me a mail at
 alain dot m dot pannetier at atosorigin dot com
 
 Alain Pannetier
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.04319 seconds