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.

Bug 237064

Summary: Old XML lexer is slow during reformat
Product: xml Reporter: satory
Component: CodeAssignee: Svata Dedic <sdedic>
Status: RESOLVED WONTFIX    
Severity: normal CC: gtzabari, massimo
Priority: P3 Keywords: PERFORMANCE
Version: 7.4   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 204531
Bug Depends on: 239530, 239528, 239529, 239531, 239532    
Bug Blocks:    
Attachments: nps snapshot

Description satory 2013-10-12 17:25:27 UTC
This issue was reported manually by obrejla.
It already has 1 duplicates 


Build: NetBeans IDE 7.4 (Build 201310012201)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.0-b56, Java(TM) SE Runtime Environment, 1.7.0_40-b43
OS: Linux

User Comments:
satory: Trying to Format a large XML file.  Netbeans is horrendously slow that this operation.



Maximum slowness yet reported was 569855 ms, average is 569855
Comment 1 satory 2013-10-12 17:25:41 UTC
Created attachment 141031 [details]
nps snapshot
Comment 2 charlesdeb 2013-11-13 14:40:26 UTC
I submitted the report with the ID of 700178.
After doing universal search and replaces to add newlines into the fil so it was more readable, the file went from 1 line to 22,700 or so lines. I wouldn't expect instant formatting on such a large file - although just plain editing this file is pretty slow (1 second wait for each key press type thing). Also, when Netbeans was trying to format this file, it did let me know that it was taking a while and gave me the chance to cancel.
Comment 3 Svata Dedic 2013-12-16 15:32:51 UTC
I went through the reports, and need to separate the ER to several issues.

The following reports are probably invalid / do not contain enough data to pinpoint the slowness cause:
699727, 700468: invalid; logger is blocked by filling some previous (slowness ?) report 
698105: slow NT filesystem


Some of the slowness reports are caused by the old-style Lexer and its (known to be bad) performance:

700412: slow XML old-style lexer [7.3]
700357, 699372, 695916

This issue should keep track of the old lexer perf issues and/or removal. The rest of issues is distributed as separate issues, see 'depends on' list.
Comment 4 Martin Balin 2016-07-07 09:56:46 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss