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 84047 - IDE eats CPU after applying Salami Slice to OTA schema
Summary: IDE eats CPU after applying Salami Slice to OTA schema
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Text-Edit (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 81655
  Show dependency tree
 
Reported: 2006-09-01 17:11 UTC by Andrei Chistiakov
Modified: 2007-09-25 01:33 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ota schema (816.69 KB, application/octet-stream)
2006-09-05 08:48 UTC, Ayub Khan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Chistiakov 2006-09-01 17:11:31 UTC
Reproduced in build 060831_2 (JDK 1.6 Beta 2)

To reproduce the bug:

- open a single file OTA schema;
- apply Salami Slice pattern to the schema;
- after the pattern is applied, close the schema and discard the changes.

CPU consumpltion remains at ~50% until IDE is closed.
Comment 1 Ayub Khan 2006-09-05 08:45:05 UTC
This seems to be a NB5.5 XML editor issue.

Steps to reproduce.
==================

1. Install NB5.5 (plain, ie., no ent55 pack)
2. Open IDE, create a new java project P1
3. Create a new schema file 'f.xsd'.
4. Open attached schema 'ota.xsd' in the IDE (you can open from favourites or
save this file into the project P1 'Source packages')
5. Copy(CTL+A followed by CTL+C) contents of ota into clipboard.
6. Now select contents of f.xsd by doing CTL+A. Then paste contents of clipboard
into selected contents of f.xsd by doing CTL+V.
(Note: You can also use mouse to copy/paste contents of ota.xsd onto f.xsd)
7. Now IDE will eat up CPU.
Comment 2 Ayub Khan 2006-09-05 08:48:07 UTC
Created attachment 33586 [details]
ota schema
Comment 3 Marek Fukala 2006-09-05 12:23:21 UTC
The problem is reproducible, I am working on evaluation and a fix. Downgrading
to P2 since the problem happens only for extraordinarily big files and just
unders some circumstrances.
Comment 4 Marek Fukala 2006-09-05 17:10:13 UTC
fixed. Now it is much more faster, though I still have a performance (algorithm)
problem in TreeNodeAdapter which causes a similar problem when deleting the
entire content of a big XML file. I will fix that. Reporter, please verify your
original issue. 

Checking in
tageditorsupport/src/org/netbeans/modules/editor/structure/api/DocumentModel.java;
/cvs/xml/tageditorsupport/src/org/netbeans/modules/editor/structure/api/DocumentModel.java,v
 <--  DocumentModel.java
new revision: 1.7.2.2.2.7; previous revision: 1.7.2.2.2.6
done
Checking in
text-edit/src/org/netbeans/modules/xml/text/navigator/TreeNodeAdapter.java;
/cvs/xml/text-edit/src/org/netbeans/modules/xml/text/navigator/TreeNodeAdapter.java,v
 <--  TreeNodeAdapter.java
new revision: 1.2.2.2.2.7; previous revision: 1.2.2.2.2.6
don
Comment 5 Marek Fukala 2006-09-06 10:57:29 UTC
fixed the problem with deleting the document content.

Checking in TreeNodeAdapter.java;
/cvs/xml/text-edit/src/org/netbeans/modules/xml/text/navigator/TreeNodeAdapter.java,v
 <--  TreeNodeAdapter.java
new revision: 1.2.2.2.2.8; previous revision: 1.2.2.2.2.7
done


However, I have just realized that the original problem is not fully fixed when
code folding is enabled. I have disabled it yestarday to simplify debugging of
navigator and forgot to check it before committing. I'll try to fix this as well. 
Comment 6 Marek Fukala 2006-09-06 11:57:44 UTC
fixed the performance problem when code folding is enabled.

Checking in XmlFoldManager.java;
/cvs/xml/text-edit/src/org/netbeans/modules/xml/text/folding/XmlFoldManager.java,v
 <--  XmlFoldManager.java
new revision: 1.6.2.2.2.2; previous revision: 1.6.2.2.2.1
done
Comment 7 Andrei Chistiakov 2006-09-07 10:05:49 UTC
Verified in build 060906_1.