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 73884 - excessive GC invocations when editing comments
Summary: excessive GC invocations when editing comments
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All Linux
: P4 blocker (vote)
Assignee: issues@java
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2006-03-22 15:19 UTC by stange
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stange 2006-03-22 15:19:55 UTC
I've noticed this before but never reported it.

When editing comments, the netbeans IDE drives the GC crazy.  I started netbeans
with -verbose:gc.  I'm currently running with the latest Mustand build, but this
also happens with the 1.5 JVMs.   I'm editing a 2000 line java file and have
opened a comment and started typing

/** this is a new comment and ...

With each keystroke I get about 3 to 5 minor GC events, with an occasional Full
GC thrown in for good measure.   I get this same blizzard of GC activity when
adding text or deleting it within the comment.

The moment I close the comment with a */, then the GC activity level drops back
to normal.

The problem is clearly related the automatic parsing.   If I bump the automatic
parsing delay way up, then I don't see this problem.

Anyway, for whatever reason, editing block comments is making something generate
an enormous amount of garbage with each keystroke.   Perhaps the automatic
parser should be shut down during editing of block comments, as the code is
probably going to be invalid anyway while the closing */ is missing.
Comment 1 Jiri Prox 2006-03-23 08:45:38 UTC
I've tested it and I haven't seen any rapid increase of gc events when writing
comments in comparison to editig common source. There is also no influence on
performance so i'm downgrading this issue to P4.
If you have some performance problems while writing comments feel free to set
higher priority again.
I'm not closing it as WFM now in order of further consideration of disablig
parsing during comments editing.
Comment 2 Jiri Prox 2006-03-23 08:46:29 UTC
P3 -> P4
Comment 3 stange 2006-03-24 17:34:13 UTC
Make sure you're trying this with a larger file.   For fun, I made a file with a
6000 lines  in it.   Editing within a comment is very difficult due to th long
delays and interruptions from the GC and the java parser.

I'm running on a reasonably fast system (3.06Ghz PIV), I suspect it would be
unusable otherwise.
Comment 4 Vitezslav Stejskal 2007-04-16 04:07:00 UTC
Hi, could somebody confirm that this is still happening in 6.0 builds? Most of
the java infrastructure was rewritten in 6.0, it's using javac, lexer, etc. so
perhaps things are different (better?) now.
Comment 5 Jan Becicka 2007-09-19 17:33:01 UTC
Related code was completely rewritten.