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 213435 - Slow XML completion
Summary: Slow XML completion
Status: RESOLVED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 220667 220670 220664 220665 220669 220673
  Show dependency tree
 
Reported: 2012-06-02 21:52 UTC by xylifyx
Modified: 2012-10-23 12:39 UTC (History)
18 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 188682


Attachments
nps snapshot (94.79 KB, application/nps)
2012-06-02 21:52 UTC, xylifyx
Details
nps snapshot (17.15 KB, application/nps)
2012-06-03 05:55 UTC, b-k-m
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xylifyx 2012-06-02 21:52:43 UTC
Build: NetBeans IDE 7.2 Beta (Build 201205031832)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.0-b21, Java(TM) SE Runtime Environment, 1.7.0_04-b20
OS: Linux

User Comments:
GUEST: Editing my applicationContext.xml changing from value of a property.

xylifyx: editing pom



Maximum slowness yet reported was 6923 ms, average is 4365
Comment 1 xylifyx 2012-06-02 21:52:50 UTC
Created attachment 120247 [details]
nps snapshot
Comment 2 b-k-m 2012-06-03 05:55:14 UTC
Created attachment 120251 [details]
nps snapshot
Comment 3 Svata Dedic 2012-10-22 14:59:59 UTC
No real issue found in snapshot in comment (1), except very long processing of Document.insertString() called from loadSwingDocument. Also insertString() is called multiple times from 1 loadSwingDocument - the implementation inserts individual lines into document: not necessary, can use some fixed-size buffer for loading.
Comment 4 Svata Dedic 2012-10-22 15:01:58 UTC
Snapshot in comment #2 shows completion waiting on HTTP while downloading external entity definitions. Will not fix, it's a network issue.
Comment 5 Svata Dedic 2012-10-23 12:05:16 UTC
Reports processed up to 2012-10-22 (#62868). Summary for the processed reports:


587699, 598517, 608418, 620028, 620189: seems like evaluation of a rather complex schema with respect to substitutions, no fetching done. However loading all schema models takes 0,6sec and their processing another 0,5sec.
620013, 620014, 620015: retrieval from URL
585525, 586065, 602594, 611547, 613221, 618745: lot of time is spent in schema document load, through loadSwingDocument which loads line after line. Lot of processing is triggered after each insertString.
618517: WSDL parsing of downloaded stuff takes 43% of schema downloader time.
609604: initialization of Spring XML completion
587699, 602566: addNSAwareCompletionItem triggers model creation, since the replacement text is being constructed.

Not relevant (covered above, or non-errors):

584855, 584856, 585327, 585465, 586126, 586162, 586469, 586478, 587577, 588515, 589077, 590456, 590963, 590975, 591592, 592670, 592720, 592755, 592821, 593040, 593482, 594211, 594337, 595351, 595405, 595406, 595407, 595408, 595409, 595410, 595411, 595776, 597238, 597771, 597940, 598293, 598294, 598295, 601088, 609605, 616618, 617335, 617499, 617685, 618517, 619299, 620868: retrieval of remote resource.
619923: treshold of 750ms spent in classloading and partially in FXML completion - in Java model.
618935: initialization of various providers (classloading) + loadSwingDocument.
612598: classloading, cancelling maven process (but waiting properly for cancel to finish, no defect)
587287, 591555, 599648, 600798, 600826, 606519, 607441: initializing IDE. Lookup initialization is on the stack. Class+resource loading
Comment 6 Svata Dedic 2012-10-23 12:39:15 UTC
Separate bugs were filed for the found issues: 220664, 220665, 220667, 220669, 220670, 220673.

The rest of reports does not contain data which indicate other slowness causes - closing.