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.
If you have a very large css file (like in Easel Rabbit Demo), then if you: - run file (doesn't seem to matter of it is Chrome or embedded) - select some element in Navigator and select some style - and now Add Property from Rule Editor, it tooks a second (sometimes barely noticeable, sometimes it tooks 1-2sec) to reflect this new property in rule editor window while browser already shows the change. Suggestion: I guess that when the css property is added (or removed) via Rule Editor, the css file is somehow "re-parsed". If it cannot be improved in terms of speed, would it be possible to add some sort of progress bar/icon so user know that the changes are in progress? Something like: http://wiki.netbeans.org/File:Busy_window_notification.png I've noticed there is some "busy" icon (next to the filter icons in Rule editor) that looks like icon of Databases node in Services window but it is not always displayed Product Version: NetBeans IDE Dev (Build EaselCSS-577-on-20120827) Java: 1.7.0_06; Java HotSpot(TM) Client VM 23.2-b09 System: Linux version 3.2.0-29-generic-pae running on i386; UTF-8; en_US (nb)
just for curiosity the "database" icon should be removed - I've added it just for my debugging purposes. It is shown from the moment user modified the css source model until new model is created and applied to the RuleEditor. This involves file save, css parsing and css source model creation.
99% of the slowness is: "org.netbeans.modules.web.inspect.webkit.ui.CSSStylesPanel" - Thread t@50 java.lang.Thread.State: RUNNABLE at org.netbeans.modules.css.model.impl.ModelElement.acceptVisitorGeneric(ModelElement.java:105) at org.netbeans.modules.css.model.impl.ModelElement.accept(ModelElement.java:89) at org.netbeans.modules.css.model.impl.ModelElement.accept(ModelElement.java:86) at org.netbeans.modules.css.model.impl.ModelElement.accept(ModelElement.java:86) at org.netbeans.modules.css.model.impl.ModelElement.accept(ModelElement.java:86) at org.netbeans.modules.css.model.impl.ModelElement.accept(ModelElement.java:86) at org.netbeans.modules.css.model.impl.ModelElement.accept(ModelElement.java:86) at org.netbeans.modules.css.model.impl.ModelElement.accept(ModelElement.java:86) at org.netbeans.modules.web.inspect.webkit.Utilities.findRuleInStyleSheet0(Utilities.java:175) at org.netbeans.modules.web.inspect.webkit.Utilities.findRuleInStyleSheet(Utilities.java:103) at org.netbeans.modules.web.inspect.webkit.ui.CSSStylesPanel$RuleEditorTask$1.run(CSSStylesPanel.java:470) at org.netbeans.modules.css.model.api.Model$1.run(Model.java:192) at org.openide.util.Mutex.readAccess(Mutex.java:367) at org.netbeans.modules.css.model.api.Model.runReadTask(Model.java:189)
It is really extremely slow on my mac, the fix needs to be done in the css source model.
Created attachment 125298 [details] profiler snapshot after adding new property - minor delay
Created attachment 125301 [details] another snapshot another snapshot, just to be sure :) It is not that slow for me, but I noticed that once I pressed enter to confirm value of new property, RE contains this property immediately but after a while RE is refreshed (empty and repopulated with previous selection). There is also a delay with first population of RE (reproducible with the same rabbit app and e.g. selecting .btn style from Styles window)
changeset: 234960:066e07ff3341 summary: #217515 - speeding up the o.n.m.css.model.api.ModelVisitor I've removed the generic reflection based code from the visiting support. Less flexible, but 30times faster. However the css model creation itself is still very slow as it is also based on reflection. I'd have to reconsider that much deeper. I've created o.n.m.css.model.impl.ModelElementTest.testAcceptVisitorGeneric_speed test which shows that parsing & the source model creation of the bootstrap.css (from easel rabbit demo) takes approx. 2700ms on my Mac. Most of the time is the model creation, the parsing itself is very fast.
I've double-checked and the parsing is not that fast as I used to think: bootstrap.css: file parsing took 870ms. model creation took 1756ms.
changeset: 234978:91ff1200866e tag: tip user: Marek Fukala <mfukala@netbeans.org> date: Wed Oct 03 16:32:54 2012 +0200 summary: #217515 - removing the reflection from ElementsFactoryImpl now the times are: file parsing took 825ms. model creation took 351ms. ...so the model creation is approximately 5 times faster than before. I've verified also with the easel rabbit demo and I can confirm now it is far far better.
> another snapshot, just to be sure :) It is not that slow for me, but I noticed > that once I pressed enter to confirm value of new property, RE contains this > property immediately but after a while RE is refreshed (empty and repopulated > with previous selection). Do you really see the whole rule editor to be empty for a while? Or just the property value "flashes" (I've fix this today or yesterday). Shouldn't this be filled as another bug?
Whole RE, reported as issue 219458. I thought if it could be related this issue...