This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Originally, this bug was filed on Netbeans Enterprise Pack build. See http://bt2ws.central.sun.com/CrPrint?id=6417777. We ran the profiler and found few hotspots: 1. DocumentModel.updateModel() 2. DocumentModel.DocumentModelModificationTransaction.removeDE() Both these classes are in package org.netbeans.modules.editor.structure.api. Please find the snapshot from profiler. I tried to simulate the same from NB5.5 build and it turns out IDE consumes 100% CPU in multiple situations. 1. Open OTA_TravelItinerary schema and restart IDE. 2. Open OTA_TravelItinerary schema, make some changes like replaceALL on some xsd:attributeGroup. For your convenience, I have attached the schema.
Created attachment 30075 [details] Snapshot from profiler
Created attachment 30076 [details] OTA schema file
Assigning to Marek. Marku, could this be related to issue 74506 that you were fixing recently?
As for the case #1 (open the xml document) - the document model + navigator UI initialization time is ~2000ms, regardless whether opened in editor and restarted or just opened. In the first case the time is longer since there is a lot of things being initialized during startup. As for the second case it is worser. Many document content updates in certain places causes the document model to handle each of them separately which takes quite long time for such big document and for such big amount of modifications. I will try to improve it, or, if it won't be feasible, I'll do a hack like that if there is so many modifications at once, I'll throw the current model and rescan the whole document again.
I am afraid it is not possible to fix the problem without doing some extensive changes. I will fix the problem by reimplementing part of the xml model code responsible for xml document changes identification, but not to release 5.5 beta. We agreed with Petr Jiricka and Petr Blaha that the issue will be fixed after and also on downgrading it to P2 (the problem is serious, but occures just under some non-trivial circumstances).
*** Issue 76208 has been marked as a duplicate of this issue. ***
I am duplicating the Issue #76208 to this issue since both of them are mostly about the same (previously described) problem. I am going to reimplement part of the DocumentModel code and the XMLDocumentModel navigator implementation to 5.5 so both issue should be fixed.
Hopefully fixed - the performance on the big file is now much more better. Please verify asap... Checking in tageditorsupport/src/org/netbeans/modules/editor/structure/api/Docum entModel.java; /cvs/xml/tageditorsupport/src/org/netbeans/modules/editor/structure/api/Document Model.java,v <-- DocumentModel.java new revision: 1.7.2.2.2.4; previous revision: 1.7.2.2.2.3 done Checking in text-edit/src/org/netbeans/modules/xml/text/navigator/TreeNodeAdapte r.java; /cvs/xml/text-edit/src/org/netbeans/modules/xml/text/navigator/TreeNodeAdapter.j ava,v <-- TreeNodeAdapter.java new revision: 1.2.2.2.2.5; previous revision: 1.2.2.2.2.4 done
Verified NetBeans 5.5Dev 200608220000
*** Issue 85245 has been marked as a duplicate of this issue. ***