« květen 2008
PoÚtStČtSoNe
   
1
2
3
4
5
7
8
9
10
12
13
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
       
Today
XML

NetBeans Frappr! Map

Navigation

Speaker Profile
Roumen's Weblog
Login
Sun Bloggers
Technorati Profile

Am I popular?

Today's Page Hits: 5122

Contact Me

Name: Roman Strobl
E-mail: roman dot strobl
at sun dot com
ICQ: #54106719
Collab: Roumen@share.java.net

NetBeans

Java Sites

Javalobby
The Server Side
Java Tips
Java Blogs
java.net
java.sun.com
java.cz

Blogs

NetBeans:
Geertjan
Brian Leonard
Gregg Sporar
Lukas Hasik
Ludovic Champenois
Vincent Brabant
Alexis Moussine-Pouchkine
Jullion-Ceccarelli
Tom Ball
Tim Boudreau
Jesse Glick
Petr Blaha
Ruth Kusterer
Jara Uhrik
xzajo
Jan Lahoda
James Branam
nbextras.org

Sun:
Kazem - bug cartoons ;-)
Tor Norbye
Romain Guy
James Gosling
Chief Gaming Officer
Jim Grisanzio
Jonathan Schwartz

Planets:
Planet Netbeans
Planet Sun
Planet Eclipse

Other:
netbeans-blog.org
Joel Spolsky
Bruce Eckel

License info

Creative Commons License
This work is licensed under a Creative Commons License.

Recent Entries

Map of visits

Locations of visitors to this page
« This is how I risk... | Main | Weird Sun Microsyste... »
20080214 Čtvrtek únor 14, 2008
Partial parsing in NetBeans editor leads to significant performance boost

I got this info from Tomaz Zezula and Jan Becicka:

We made changes in the 6.1 java editor to reparse and reattribute only modified method rather than the whole java file. This leads to significant performance improvements. When the user types into the method only the top level method is reparsed which decreases both parse+attribute time and the time needed by tasks (hints, error marking, navigator) to recalculate changes. For example for modification of a method in the 150KB java class the benchmark looks like this:

Action
 BeforeAfter
Reparse
75 ms
1 ms
Signature reattribution
318 ms
0 ms

Body reattribution

166 ms

4 ms

Also the newly added API allows the tasks listening on the Java model to recompute data only for changed method rather than for the whole file. Partial reparse has several limitations, it can't be used for methods contained in local classes or when modifying the source code of added or removed anonymous class.

What does this all mean for the user? It means much faster response in the java editor when making changes in the source code - full reparse is now mostly not needed and partial reparse is much faster (as seen on the table above). These changes are most visible on large classes where full reparse could have taken significant time in previous versions.

Trackback URL: http://blogs.sun.com/roumen/entry/partial_parsing_in_netbeans_editor
Comments:

Impressive numbers for sure. Are these modifications already part of recent NB6.1 nightly builds? Surely would love giving that a try. ;)
Cheers,
Kristian

Posted by kawazu on únor 14, 2008 at 10:11 dop. CET #

Yes, the changes are a part of the latest daily build.

Posted by Roman Strobl on únor 14, 2008 at 10:16 dop. CET #

Cool. On my way into this - would be kinda nice a gift for Valentine's day. ;)

Posted by kawazu on únor 14, 2008 at 10:28 dop. CET #

Great news, I'm just wondering if this kind of enhancement could be done for the jsp/jsf editor?

Posted by stojan on únor 14, 2008 at 10:48 dop. CET #

The JSP performance issues are separate, we are aware of them, e.g. look at:

http://www.netbeans.org/issues/buglist.cgi?issue_id=123370,71584,123441

Posted by Roman Strobl on únor 14, 2008 at 12:22 odp. CET #

It's really faster on my class which extends JTable.

Posted by zajo on únor 14, 2008 at 02:11 odp. CET #

Do you have any docs on partial parsing method used ?

Posted by Laurent M on únor 14, 2008 at 05:06 odp. CET #

Sorry, no docs are currently available.

Posted by Roman Strobl on únor 14, 2008 at 05:09 odp. CET #

Will this feature be backported in NB6.0?

Posted by Roman on únor 16, 2008 at 08:21 dop. CET #

We have no plans for backporting - 6.1 is coming in 3 months. We always look ahead - if we would spend time by backporting the progress of the IDE would be much slower.

Posted by Roman Strobl on únor 16, 2008 at 11:53 dop. CET #

Really nice performance enhancement, i am looking forward to testing it.

Are you currently working on other performance enhancements?

Startup time is quite slow on a mac, but that might also have something to do with the fact that we do not have JRE 6 yet. :-(

Posted by Jesper Terkelsen on únor 17, 2008 at 10:02 odp. CET #

Yes, performance is one of big topics for 6.1. Expect faster startup in final 6.1, too, the developers are implementing a cache for modules which should bring significant improvements compared to 6.0. Performance in other areas should also get better.

Posted by Roman Strobl on únor 17, 2008 at 10:27 odp. CET #

Hi! About the nb6 startup time... Come on guys! nb its an IDE! (+platform+community ;) not a text editor with syntax highlight.
I dont see why startup time should be an issue. How many times you startup your nb a day? two times? It should be running all day, it purpose is to deal with giant projects not be a ultra-light-small-footprint-application. If you want a text editor to goof around with small java files please use notepad++ or something.

Posted by Mauricio on únor 27, 2008 at 04:17 dop. CET #

@Mauricio: You're right. :) I start it up once (in the morning), maybe twice if there are some updates to be installed (which happens during lunch break). Startup time isn't really of interest to me. The only "performance" issue so far I would subscribe to is the fact that JSP editor is a little slow in some situations. Asides that, I am pleased, at the very least with current 6.1 builds, in terms of speed. :)

Posted by kawazu on únor 27, 2008 at 07:51 dop. CET #

I usually start NetBeans 3-4 times a day, because sometimes it takes >500mb of memory. So, maybe it will be better to spend some time improving this issue than startup time.

Posted by stojan on únor 27, 2008 at 05:42 odp. CET #

Incremental syntactic analysis finally discovered? :-) I thought full reparsing each time was considered insane for IDEs a long time ago. BTW, how does this fit with Java Compiler API, which is AFAIK used in NetBeans editor for parsing since version 6?

Posted by Ladislav Thon on březen 10, 2008 at 06:14 odp. CET #

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed


    Disclaimer: The contents of my blog represent my personal opinions which may differ from official views of my employer, Sun Microsystems.