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.
Automated performance tests shows increase of time for Open schema view and Open complex schema view testcases. For first one we use project "TravelReservationService" and schema "OTA_TravelItinerary" for second project HL7 and schema "fields". In comparision with previous build there is sufficient regression : from 5 up to 15 sec and from 15 up to 62 sec respectively for these cases.
P.S. threshold for thess actions is 1000 ms.
Indeed, I do see a big overhead.
Marek, the getDocumentModel() inside initFolds() seems to be very expensive while opening of the file. I have a patch that will fix the problem, however it has a side effect as well. When file is big, the folds may not be seen first time. So I was wondering if there is a way to refresh the folds when the ReqProcessor finishes. If SwingUtilities.invokeLater is used instead of RequestProvessor, switching to source view holds the UI for a while for obvious reason. So I prefer RequestProvessor.
Created attachment 49598 [details] text-edit patch
Please better use the attached patch. It is a kind of hack though the main idea is correct. I hope it is self explanatory. I am sorry for doing the performance regression. I was aware of this, I didn't have much time to tune the last change, it was just a prototype showing how it can work. Regards, Marek
Created attachment 49661 [details] The DocumentModel and XMLFoldManager patch
I'm sorry, there is no folds whatsoever with this patch. Once you have a fix, can you please open fields.xsd file (under hl7 unit test package in xml/axi module). It shouldn't take more than 3sec to open and of course, folds should be there :). Please take a look (if you didn't) at the patch I suggested and see if that can be improved to refresh the folds.
*** Issue 117672 has been marked as a duplicate of this issue. ***
I tried to fix the patch but found some other problems. Fixing of them requires some time which I do not have unfortunatelly. Mayby you can use your own patch.
On linux, I do see a downgrade in performance, but not as drastic as Desc1 states. With the following system: Product Version: NetBeans IDE 6.0 Beta 2 (Build 200710212201) Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05 System: Linux version 2.6.22-14-generic running on i386; UTF-8; en_US (nb) To open OTA is about 8 sec. and to open Fields is about 11 sec. I don't think it is that bad. Using an older build on the same system: Product Version: NetBeans IDE 6.0 Beta 2 (Build 200709201200) Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05 System: Linux version 2.6.22-14-generic running on i386; UTF-8; en_US (nb) I get times of about 4 sec to open OTA and about 2 sec to open Fields. I suggest downgrading to a P3. Any objections?
Sounds reasonable to me...
There were no objections. Downgrading to P3.
Fix integrated: http://hg.netbeans.org/main/rev/26fbf1aa6d3a The fold manager is completely re-written using lexer. It doesn't use the document model anymore. fields.xsd takes about 3-4 sec and OTA schema takes about 2sec.
>fields.xsd takes about 3-4 sec and OTA schema takes about 2sec. On each document change? I cannot imaging the way how you optimize the folds update without rescanning the whole document.
Wow, opening is soooo much faster now even for huge schema like HL7 fields.xsd and reopenings! Fix Verified. Product Version: NetBeans IDE Dev (Build 200802120006) Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119 System: Mac OS X version 10.5.2 running on i386; MacRoman; en_US (nb)