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 184893 - 20s in Smarty files check
Summary: 20s in Smarty files check
Status: RESOLVED DUPLICATE of bug 201743
Alias: None
Product: php
Classification: Unclassified
Component: Smarty (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal with 1 vote (vote)
Assignee: Martin Fousek
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2010-04-23 23:46 UTC by mvfranz
Modified: 2011-09-13 06:23 UTC (History)
87 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 168378


Attachments
nps snapshot (3.26 KB, application/nps)
2010-04-23 23:46 UTC, mvfranz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mvfranz 2010-04-23 23:46:29 UTC
Build: NetBeans IDE Dev (Build 100422-577952f4f3c3)
VM: Java HotSpot(TM) 64-Bit Server VM, 14.3-b01-101, Java(TM) SE Runtime Environment, 1.6.0_17-b04-248-10M3025
OS: Mac OS X
Maximum slowness yet reported was 39550 ms, average is 10698
Comment 1 mvfranz 2010-04-23 23:46:35 UTC
Created attachment 97946 [details]
nps snapshot
Comment 2 Vince Kraemer 2010-06-02 18:32:15 UTC
this report has almost 300 dups to date...

It appears to have been introduced around April 21, 2010...
Comment 3 Jiri Sedlacek 2010-06-07 12:44:39 UTC
Just submitted another slowness report: http://statistics.netbeans.org/analytics/exception.do?id=399097.

According to the generated .nps snapshot the reason is calling

  - org.netbeans.modules.tomcat5.util.TomcatUsers.createUser()

in the EDT when registering a new Server instace, which calls

  - org.openide.xml.XMLUtil.write()

and at the end blocks the UI in

  - java.util.zip.ZipFile.open[native]()


IMO the Tomcat user should be created lazily outside of the EDT, if possible.
Comment 4 rharms 2010-06-08 01:19:40 UTC
I've run into this problem in both 6.9 RC1 and RC2. In a free-form project, editing a JSP hangs every few seconds for 10-15 seconds. On a fresh launch of NB, first file opened being the JSP (part of a fairly large project), it begins hanging immediately after just a  few keystrokes. Since I reported this about an hour ago for the second time (Report #168378), there's already been 6 more reports made.

I don't know about the others, but 6.9 is going to be useless to us with this problem unresolved. Please consider taking a look at it before release.
Comment 5 Tomas Pavek 2010-06-08 14:38:14 UTC
This bug collects lots of unrelated slowness reports. I've found two related to hanging JSP editor and filed a new bug 187337.
Comment 6 Marian Mirilovic 2011-05-24 15:33:24 UTC
452 duplicate ... very probably most of the unrelated .. but we need to do something about it, at least improve infrastructure to divide it automatically and correctly
Comment 7 Tomas Hurka 2011-06-02 10:42:24 UTC
It looks like org.netbeans.api.progress.ProgressUtils.runOffEventDispatchThread() does not work well with TimableEventQueue, since no slowness reported should be reported in situations, when ProgressUtils.runOffEventDispatchThread() is running. Jardo, can you take a look. Thanks.
Comment 8 Jaroslav Tulach 2011-06-22 11:37:27 UTC
Does not affect releases. Slowness detector in such case starts only after 20s and that none of the reports here is longer than 20s.
Comment 9 Jaroslav Tulach 2011-09-12 14:15:39 UTC
Let's forget the old reports and let's concentrate on the new ones. Looking at
http://statistics.netbeans.org/exceptions/exception.do?id=526964
it seems that 

org.netbeans.modules.php.smarty.SmartyPhpFrameworkProvider$1.run() 
calls about 33 times
org.netbeans.modules.php.smarty.SmartyPhpFrameworkProvider.locatedTplFiles()
which in turn checks some mimetype of about 60 files.

Using org.netbeans.api.progress.ProgressUtils is probably not the best method to signal to user such a heavyweight I/O load. Consider doing this kind of scan on background, possibly as soon as PHP project is opened, etc.
Comment 10 Martin Fousek 2011-09-13 06:23:47 UTC
Thanks for your advice. This should be already resolved since I replaced FileUtil.getMIMETypeExtensions and comparing extensions with FileUtil.getMIMEType(fo, mime).

After last measuring and I got ~250ms for php project consist of whole media wiki (about 1GB sources) - before that it was ~20s.

Marking as duplicate of issue #201743.

*** This bug has been marked as a duplicate of bug 201743 ***