Bug 42670 - Chainsaw is highly sluggish when running for extended amount of time.
Summary: Chainsaw is highly sluggish when running for extended amount of time.
Status: RESOLVED FIXED
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: chainsaw (show other bugs)
Version: unspecified
Hardware: Other other
: P2 major
Target Milestone: ---
Assignee: log4j-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-15 04:39 UTC by Tomasz Hadam
Modified: 2008-09-09 22:18 UTC (History)
1 user (show)



Attachments
Fix for bug 42670 (1.33 KB, patch)
2007-06-15 04:41 UTC, Tomasz Hadam
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Hadam 2007-06-15 04:39:41 UTC
Chainsaw is highly sluggish when running for extended amount of time. It 
happens when there is a big number of LoggingEvents for each tab. The problem 
is that ChainsawCyclicBufferTableModel creates HashSet (idSet) to keep id 
number for each row and never removes entries from this hashSet. That's why 
the amount of used memory is constanlty growing.
Comment 1 Tomasz Hadam 2007-06-15 04:41:37 UTC
Created attachment 20352 [details]
Fix for bug 42670
Comment 2 Thorbjørn Ravn Andersen 2008-06-30 14:26:12 UTC
The ChainsawCyclicBufferTableModel class in trunk does not appear to have had the supplied bugfix applied.  Is Tomasz Hadams approach the correct way to ensure that the model does not grow too big?
Comment 3 Paul Smith 2008-06-30 14:51:56 UTC
I'll take a look at this soon, but really the suggested patch is not really correct.  All the patch does is clear out the idSet hash ( and done quite inefficiently by the looks of it).

What needs to happen is that on insert into the Cyclic list, if one 'pops' out, the list should return the dropped event, and we can then use that to remove the ID from the hashset individually.
Comment 4 Paul Smith 2008-09-09 22:15:46 UTC
Fixed in revision 693706.  Now just prior to the oldest event being clipped, we remove that event's ID from the tracking set.