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 227758

Summary: org.netbeans.lib.xml.lexer.XMLLexer.nextToken: LowPerformance took 596562 ms.
Product: xml Reporter: Exceptions Reporter <exceptions_reporter>
Component: LexerAssignee: Svata Dedic <sdedic>
Status: RESOLVED INCOMPLETE    
Severity: normal CC: alexvsimon, dustin_mccartney
Priority: P3 Keywords: PERFORMANCE
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 161993
Attachments: nps snapshot

Description Exceptions Reporter 2013-03-21 08:36:53 UTC
Build: NetBeans IDE 7.3 (Build 201302261559)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.7-b01, Java(TM) SE Runtime Environment, 1.7.0_15-b03
OS: Windows 7

User Comments:
GUEST: Find ' and replace with " in wsdl file (580 lines)



Maximum slowness yet reported was 596562 ms, average is 121970
Comment 1 Exceptions Reporter 2013-03-21 08:37:17 UTC
Created attachment 132891 [details]
nps snapshot
Comment 2 Svata Dedic 2013-03-21 09:47:16 UTC
Reporter: could you please provide the .xml file ? I tried to search & replace " for ' or ' for " on a 1meg file and got rather different profiling results, so your file may trigger some 'anomaly' in the lexer.

Some slowdown is expected, as ' <-> " replacement on the start of an attribute will cause lexer to relex the relevant part, and because the attribute end was not replaced (yet), it extends the attribute, invalidating the former lexer tokens. More importantly, it re-reads the part of the document. So the effects depend on how your elements look like.