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.
Product Version: NetBeans IDE Dev (Build 071029) Java: 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105 System: Linux version 2.6.17-12-generic running on i386; UTF-8; en_US (nb) Steps: 1) start IDE with new userdir 2) register Tomcat 3) create New Project - Samples - Web - JSP Examples 4) open some jsp 5) try to edit it ERROR: it takes aprox. 20 sec when the cursor is visible in editor thread dumpm attached.
Created attachment 51974 [details] thread dump
The issue is reproducible in NB 6.0.
Assign to correct component.
But there is nothing interesting going on in the attached threaddumpl. Can you try make another one please?
This is reproducible. I think it's connected with the fresh userdir. It really takes more than 15 seconds during first jsp modification. The processor during this time is used for 100%. When I restart the ide then doesn't work perfect, the first changed after second start takes about 3 seconds, but is much better then after first start.
Created attachment 52026 [details] There are some interesting thread dumps during the first change after first start of the IDE.
Created attachment 52032 [details] new thread dump
The time is spent mainly in Schlieman languages initialization - see following part of the stack - Mila Lexer calls Language.embedding for all possible tokens of the language to determine all possible language paths for the document. For those which are Schlieman's the LanguagesManager.initLanguage() is called and since they are initialized for the first time the initialization itself including dynamic mime lookup registration takes a lot of time. So briefly - after the file edit JSP, EL, HTML, CSS, JAVASCRIPT languages are initialized. Except EL all are more or less handled by Schlieman. at org.netbeans.modules.languages.LanguagesManager.initLanguage(LanguagesManager.java:284) at org.netbeans.modules.languages.LanguagesManager.getLanguage(LanguagesManager.java:161) - locked <0x9139a478> (a org.netbeans.modules.languages.LanguagesManager) at org.netbeans.modules.languages.lexer.SLanguageProvider.findLanguage(SLanguageProvider.java:74) at org.netbeans.lib.lexer.LanguageManager.findLanguage(LanguageManager.java:140) - locked <0x91cb7c98> (a java.lang.String) at org.netbeans.api.lexer.Language.find(Language.java:163) at org.netbeans.api.html.lexer.HTMLTokenId$1.embedding(HTMLTokenId.java:141) at org.netbeans.spi.lexer.LanguageHierarchy$Accessor.embedding(LanguageHierarchy.java:380)
Reproducible. JavaScript and CSS nbs file are not initialized, when user opens simple JSP file without any CSS, JavaScript embedded. First initialization of these two languages can be long. So I have optimized initialization of these languages. The rest of fix should be done in JSP editor implementation. Marku, can you force initialization of CSS and JavaScript, before you open JSP? Call: LanguagesManager.get ("text/css") and LanguagesManager.get ("text/javascript") please. IDE:------------------------------------------------- IDE: [10/30/07 8:21 PM] Committing "CSS Editor Support" started cvs server: scheduling file `FontAndColorsInlinedCSS.xml' for addition cvs server: scheduling file `FontAndColors.xml' for addition cvs server: use 'cvs commit' to add these files permanently RCS file: /cvs/languages/css/src/org/netbeans/modules/languages/css/FontAndColors.xml,v done Checking in FontAndColors.xml; /cvs/languages/css/src/org/netbeans/modules/languages/css/FontAndColors.xml,v <-- FontAndColors.xml initial revision: 1.1 done RCS file: /cvs/languages/css/src/org/netbeans/modules/languages/css/FontAndColorsInlinedCSS.xml,v done Checking in FontAndColorsInlinedCSS.xml; /cvs/languages/css/src/org/netbeans/modules/languages/css/FontAndColorsInlinedCSS.xml,v <-- FontAndColorsInlinedCSS.xml initial revision: 1.1 done Checking in layer.xml; /cvs/languages/css/src/org/netbeans/modules/languages/css/layer.xml,v <-- layer.xml new revision: 1.10; previous revision: 1.9 done Checking in Bundle.properties; /cvs/languages/css/src/org/netbeans/modules/languages/css/Bundle.properties,v <-- Bundle.properties new revision: 1.15; previous revision: 1.14 done IDE: [10/30/07 8:21 PM] Committing "CSS Editor Support" finished IDE:------------------------------------------------- IDE: [10/30/07 8:21 PM] Committing "resources" started cvs server: scheduling file `FontAndColors.xml' for addition cvs server: use 'cvs commit' to add this file permanently Checking in Bundle.properties; /cvs/languages/engine/src/org/netbeans/modules/languages/resources/Bundle.properties,v <-- Bundle.properties new revision: 1.7; previous revision: 1.6 done RCS file: /cvs/languages/engine/src/org/netbeans/modules/languages/resources/FontAndColors.xml,v done Checking in FontAndColors.xml; /cvs/languages/engine/src/org/netbeans/modules/languages/resources/FontAndColors.xml,v <-- FontAndColors.xml initial revision: 1.1 done Checking in layer.xml; /cvs/languages/engine/src/org/netbeans/modules/languages/resources/layer.xml,v <-- layer.xml new revision: 1.15; previous revision: 1.14 done IDE: [10/30/07 8:21 PM] Committing "resources" finished IDE:------------------------------------------------- IDE: [10/30/07 8:21 PM] Committing "layer.xml" started Checking in layer.xml; /cvs/html/editor/src/org/netbeans/modules/html/editor/resources/layer.xml,v <-- layer.xml new revision: 1.21; previous revision: 1.20 done IDE: [10/30/07 8:21 PM] Committing "layer.xml" finished IDE:------------------------------------------------- IDE: [10/30/07 8:22 PM] Committing "javascript" started cvs server: scheduling file `FontAndColors.xml' for addition cvs server: scheduling file `FontAndColorsJSON.xml' for addition cvs server: scheduling file `FontAndColorsString.xml' for addition cvs server: use 'cvs commit' to add these files permanently RCS file: /cvs/scripting/javascript/src/org/netbeans/modules/languages/javascript/FontAndColors.xml,v done Checking in FontAndColors.xml; /cvs/scripting/javascript/src/org/netbeans/modules/languages/javascript/FontAndColors.xml,v <-- FontAndColors.xml initial revision: 1.1 done RCS file: /cvs/scripting/javascript/src/org/netbeans/modules/languages/javascript/FontAndColorsJSON.xml,v done Checking in FontAndColorsJSON.xml; /cvs/scripting/javascript/src/org/netbeans/modules/languages/javascript/FontAndColorsJSON.xml,v <-- FontAndColorsJSON.xml initial revision: 1.1 done RCS file: /cvs/scripting/javascript/src/org/netbeans/modules/languages/javascript/FontAndColorsString.xml,v done Checking in FontAndColorsString.xml; /cvs/scripting/javascript/src/org/netbeans/modules/languages/javascript/FontAndColorsString.xml,v <-- FontAndColorsString.xml initial revision: 1.1 done Checking in Bundle.properties; /cvs/scripting/javascript/src/org/netbeans/modules/languages/javascript/Bundle.properties,v <-- Bundle.properties new revision: 1.18; previous revision: 1.17 done Checking in layer.xml; /cvs/scripting/javascript/src/org/netbeans/modules/languages/javascript/layer.xml,v <-- layer.xml new revision: 1.24; previous revision: 1.23 done IDE: [10/30/07 8:22 PM] Committing "javascript" finished IDE:------------------------------------------------- IDE: [10/30/07 8:22 PM] Committing "layer.xml" started Checking in layer.xml; /cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/resources/layer.xml,v <-- layer.xml new revision: 1.31; previous revision: 1.30 done IDE: [10/30/07 8:22 PM] Committing "layer.xml" finished IDE:------------------------------------------------- IDE: [10/30/07 8:22 PM] Committing "YAML Editor Support" started cvs server: scheduling file `FontAndColors.xml' for addition cvs server: use 'cvs commit' to add this file permanently Checking in Bundle.properties; /cvs/languages/yaml/src/org/netbeans/modules/languages/yaml/Bundle.properties,v <-- Bundle.properties new revision: 1.6; previous revision: 1.5 done Checking in layer.xml; /cvs/languages/yaml/src/org/netbeans/modules/languages/yaml/layer.xml,v <-- layer.xml new revision: 1.9; previous revision: 1.8 done RCS file: /cvs/languages/yaml/src/org/netbeans/modules/languages/yaml/FontAndColors.xml,v done Checking in FontAndColors.xml; /cvs/languages/yaml/src/org/netbeans/modules/languages/yaml/FontAndColors.xml,v <-- FontAndColors.xml initial revision: 1.1 done IDE: [10/30/07 8:22 PM] Committing "YAML Editor Support" finished
I'll try to put it to the jsp editor warm up task, but before that I'll check how much faster is the initialization after your migration of the features to the static layer files. Thanks for the fast fix!!!
If this needs to be appied to JSP, should a similar fix be also applied to RHTML?
added to the JspWarmUpTask, seems to be faster then. Maybe Tor could do the same for RHTML. Checking in JspEditorWarmUpTask.java; /cvs/web/core/src/org/netbeans/modules/web/core/JspEditorWarmUpTask.java,v <-- JspEditorWarmUpTask.java new revision: 1.9; previous revision: 1.8 done
Seems to be fixed. Verified. Product Version: NetBeans IDE Dev (Build 200809180201) Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11 System: Linux version 2.6.24-19-generic running on i386; UTF-8; en_US (nb)