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 41398 - Memory leak w/ Graphical Diff
Summary: Memory leak w/ Graphical Diff
Status: VERIFIED WORKSFORME
Alias: None
Product: utilities
Classification: Unclassified
Component: Diff (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2004-03-26 11:30 UTC by jd
Modified: 2005-07-26 17:32 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
After doing 5th diffing and closing the window (89.59 KB, image/png)
2004-04-05 14:07 UTC, Antonin Nebuzelsky
Details
After doing 10th diffing and closing the window (86.85 KB, image/png)
2004-04-05 14:08 UTC, Antonin Nebuzelsky
Details
Leak detector output (3.65 KB, text/plain)
2004-07-26 13:57 UTC, _ pkuzel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jd 2004-03-26 11:30:38 UTC
I'm using the RC1 and trying to diff a source with
it's cvs repository corrispondent, memory usare
grows from a medium of 70MB to up 254MB.

Textual diff is as fast as previous version
Comment 1 Richard Gregor 2004-03-27 04:41:19 UTC
Scheduled for promo D.
Comment 2 jd 2004-03-29 07:55:31 UTC
Errata Corrige:

"usare" stands for "usage"
Comment 3 Antonin Nebuzelsky 2004-04-05 14:05:40 UTC
Confirming that there is a leak when using graphical diff. You don't
even need a CVS controlled file to reproduce it. I simply took two
local ide.log files (one of 92kB, the other one of 131kB) and did 10
Tools/Diff operations on these two files. Memory meter has shown me
the following progress:

before diffing - 11,6
after closing 1st diff - 14,9
after closing 2nd diff - 15,4
after closing 5th diff - 15,6
after closing 10th diff- 19,0

As you can see there is a growth, though it is not constant, eg.
between 2nd and 5th diffing there was a small increase.

I have been watching the increase in profiler and I saw quite strange
numbers for the objects of org.netbeans.modules.diff.* classes:

For the 1st, 2nd and up to 5th diffing I saw 1 instance of all the
provider and visualizer diff objects and for the 10th diffing I saw 2
instances of all these objects. (see the two attached screenshots of
jprofiler window). Also note that the visualizer objects should have
had no instances because the diff window was always closed at the time
I took the heap snapshot.

Comment 4 Antonin Nebuzelsky 2004-04-05 14:07:26 UTC
Created attachment 14277 [details]
After doing 5th diffing and closing the window
Comment 5 Antonin Nebuzelsky 2004-04-05 14:08:04 UTC
Created attachment 14278 [details]
After doing 10th diffing and closing the window
Comment 6 Antonin Nebuzelsky 2004-04-23 11:31:19 UTC
Raising to P2.
Comment 7 Richard Gregor 2004-04-23 12:57:23 UTC
Souldn't be this issues assigned to mentlicher@netbeans.org instead of
martine@netbeans.org (or are they the same)? 
Comment 8 Antonin Nebuzelsky 2004-04-23 13:00:06 UTC
Dont' have a clue. Maybe Martin does have some reason to use a
pseudonym. :o)
Comment 9 Martin Entlicher 2004-04-23 16:00:00 UTC
It was originally assigned to "Martine@netbeans.org". I have no idea
who is it, but it's not me ;-)
So I'm reassigning it to myself, however if "Martine" would like to
solve this I would welcome that.
Comment 10 _ pkuzel 2004-07-23 14:01:00 UTC
Tonda, I cannot reproduce on local files. Profiler shows only one
DiffAction and one PatchAction instance. All other instances are
bogus, profiler cannot find path to GC root.

Is there any property to disable Timeout* references. GC is not enough
ane have to wait several minutes.
Comment 11 _ pkuzel 2004-07-23 21:01:26 UTC
Davide, could you please provide more details?

What diff action have you used?
Does really textual diff do not cause the leak?

I have not found any leak in Tools -> Diff action, so I'll close as
WORKSFORME until having better reproduction steps.

Thank you
Comment 12 _ pkuzel 2004-07-26 13:56:22 UTC
I cannot reproduce. There is no leak after multiple invocations
(closing previous results). See attachement.
Comment 13 _ pkuzel 2004-07-26 13:57:01 UTC
Created attachment 16446 [details]
Leak detector output
Comment 14 Peter Pis 2005-07-26 17:32:10 UTC
Verified.