Bug 223237 - Editor hiccups on less then 1M js files
Editor hiccups on less then 1M js files
Status: RESOLVED FIXED
Product: javascript
Classification: Unclassified
Component: Editor
7.3
PC Linux
: P2 (vote)
: 7.3
Assigned To: Petr Pisl
issues@javascript
: PERFORMANCE
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-04 10:27 UTC by Jaroslav Tulach
Modified: 2013-01-10 15:03 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
hg bundle with the project (3.86 MB, application/octet-stream)
2012-12-04 10:27 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2012-12-04 10:27:01 UTC
Created attachment 128825 [details]
hg bundle with the project

I have a JavaScript project built around ~1M JavaScript file. The editor performance, during navigation, tiny edits, etc. is not very good - especially not on my older Sony Vaio with 2GB RAM.

$ hg init
$ hg unbundle "the_attachment"

and then open index.html or bck2brwsr.js and to use the editor. Goto line, find, edit, etc.
Comment 1 Petr Pisl 2012-12-04 10:44:31 UTC
I have try it on my computer. The file is rally big, more the 28 000 lines :). The parsing of such file took 918 ms and this is out of my control. I can not do basically nothing with it. The building model for such file takes from 2 200ms to 3 300 ms. So parsing and building model takes at least more than 3 seconds.
Comment 2 Petr Pisl 2013-01-09 10:11:16 UTC
If the file has more than 1024 * 1024 bytes then it's not parsed and empty parse result is returned.
http://hg.netbeans.org/web-main/rev/bb6cff7bf886
Comment 3 Quality Engineering 2013-01-10 03:32:53 UTC
Integrated into 'main-golden', will be available in build *201301100107* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/bb6cff7bf886
User: Petr Pisl <ppisl@netbeans.org>
Log: #223237 - Editor hiccups on less then 1M js files
Comment 4 Petr Hejl 2013-01-10 14:48:24 UTC
In terms of memory fix for issue #224688 may significantly help. It looks like OccurenceImpl instances drop down from 1.5M to 0.5M on your file.
Comment 5 Petr Hejl 2013-01-10 14:49:34 UTC
I have also found a possible regression slowing down navigator. But perhaps you haven't seen it yet.

web-main b29f4389304d
Comment 6 Petr Hejl 2013-01-10 15:03:04 UTC
One thing that is really slowing down navigator is ModelUtils.resolveTypes(returnTypes, parserResult); in JsFunctionStructureItem.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo