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 207009 - javascript2.editor.model.impl.ModelUtils.resolveTypeFromExpression does extensive I/O in EDT
Summary: javascript2.editor.model.impl.ModelUtils.resolveTypeFromExpression does exten...
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.1
Hardware: All All
: P2 normal (vote)
Assignee: Petr Pisl
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2012-01-06 23:17 UTC by rasamassen
Modified: 2012-11-14 04:44 UTC (History)
32 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 184226


Attachments
nps snapshot (19.41 KB, application/nps)
2012-01-06 23:17 UTC, rasamassen
Details
nps snapshot (167.84 KB, application/nps)
2012-01-27 10:49 UTC, sebglon
Details
nps snapshot (11.38 KB, application/nps)
2012-02-15 16:27 UTC, biozes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rasamassen 2012-01-06 23:17:38 UTC
This bug was originally marked as duplicate of bug 171702, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.1 RC1 (Build 201111242103)
VM: Java HotSpot(TM) Client VM, 20.4-b02, Java(TM) SE Runtime Environment, 1.6.0_29-b11
OS: Windows 7

User Comments:
rasamassen: Ctrl+V



Maximum slowness yet reported was 8522 ms, average is 8522
Comment 1 rasamassen 2012-01-06 23:17:41 UTC
Created attachment 114694 [details]
nps snapshot
Comment 2 Jaroslav Tulach 2012-01-12 09:38:19 UTC
Hello Tyler, what was your computer doing when you experienced this slowness? A lot of I/O activity by other processes (that is our usual explanation of this kind of problem)?
Comment 3 rasamassen 2012-01-12 15:06:52 UTC
Nothing abnormal. No computer intensive activities. These delays seems to happen quite regularly in NetBeans. Maybe I hit a delete key and there's a 3-5 second freeze. Just regular typing activities. This doesn't happen in other programs.
Comment 4 Jaroslav Tulach 2012-01-12 17:39:24 UTC
If you see this often, could you try to run FileMon or other program that monitors the activity of an application for OS point of view? Also enabling verbose GC could be handy:  -J-verbose:gc -J-XX:+PrintGCTimeStamps
Comment 5 sebglon 2012-01-27 10:49:15 UTC
Created attachment 115305 [details]
nps snapshot
Comment 6 biozes 2012-02-15 16:27:56 UTC
Created attachment 115771 [details]
nps snapshot

writing code
Comment 7 Petr Jiricka 2012-06-18 21:46:45 UTC
Now I can reproduce this even outside of NetBeans, using the following simple program:

public static void main(String[] args) throws Exception {
    new URL("file://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js").openConnection();
}

So is this a JDK bug?
Comment 8 padraigdoran 2012-10-18 14:00:19 UTC
Any update on this bug? It's still being reported: http://statistics.netbeans.org/analytics/detail.do?id=184226

Thanks.
Comment 9 padraigdoran 2012-10-18 14:06:34 UTC
For me the problems is:

When I have the Navigator (Ctrl+7) open, and the option "Show non public members" turned on, while looking at large Ext based JS files and using Ctrl+space for suggestions, then NB slows down an awful lot.
Comment 10 Jaroslav Tulach 2012-10-23 10:46:53 UTC
OK, thanks for reminding us, padraigdoran. let's concentrate on your
http://statistics.netbeans.org/analytics/exception.do?id=619710
report only.

One call to
org.netbeans.modules.javascript2.editor.model.impl.ModelUtils.resolveTypeFromExpression()	6 119 ms
results in many I/O operations, like 120 of
org.openide.filesystems.URLMapper.findFileObject()
and at least 96
org.netbeans.modules.parsing.spi.indexing.support.IndexResult.getUrl()	

This just cannot be fast. Don't do such heavy I/O in EDT.
Comment 11 Petr Pisl 2012-11-09 09:33:18 UTC
Caching global variables helps a lot. Fixed in web-main: http://hg.netbeans.org/web-main/rev/ac12191cae6e
Comment 12 Quality Engineering 2012-11-10 03:26:53 UTC
Integrated into 'main-golden', will be available in build *201211100001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/ac12191cae6e
User: Petr Pisl <ppisl@netbeans.org>
Log: #207009 - javascript2.editor.model.impl.ModelUtils.resolveTypeFromExpression does extensive I/O in EDT