Project

General

Profile

bug #7904

DerivedUnitFacadeFieldUnitCacheStrategy.getCollectorAndFieldNumber() creates temporary Team objects which can not be garbage collected.

Added by Andreas Kohlbecker 2 months ago. Updated 6 days ago.

Status:
Feedback
Priority:
New
Category:
cdmlib
Target version:
Start date:
11/13/2018
Due date:
% Done:

10%

Severity:
normal
Found in Version:

Description

The root cause for the excessive memory allocation reported in #7900 is the DerivedUnitFacadeFieldUnitCacheStrategy.getCollectorAndFieldNumber() method in which new Teams are created temporarily in order to create title cache strings. When adding the collector person to this Team the team is registered as PropertyChangeListener to the Person which creates a strong reference between both. The temporary Team objects now can no longer be cleaned up by the garbage collector:

Team-merged-paths.png View (102 KB) Andreas Kohlbecker, 11/13/2018 02:06 PM


Related issues

Copied from Edit - bug #7900: Excessive heap consuption in RegistrationWorkingsetEditor with big workingsets Resolved 11/09/2018

History

#1 Updated by Andreas Kohlbecker 2 months ago

  • Copied from bug #7900: Excessive heap consuption in RegistrationWorkingsetEditor with big workingsets added

#2 Updated by Andreas Kohlbecker 2 months ago

The creation of Teams in this methods seems to be completely unnecessary

#3 Updated by Andreas Kohlbecker 2 months ago

  • Status changed from New to Feedback
  • Assignee changed from Andreas Kohlbecker to Andreas Müller
  • % Done changed from 0 to 10

I suggest two modifications:

  1. DerivedUnitFacadeFieldUnitCacheStrategy.getCollectorAndFieldNumber() without the unnecessary Team.NewInstance()
  2. removal of the registration of the person as PropertyChangeListerer to the Team

#4 Updated by Andreas Müller 6 days ago

  • Subject changed from DerivedUnitFacadeFieldUnitCacheStrategy.getCollectorAndFieldNumber() creates temporary Team objects which can not be grabage collected. to DerivedUnitFacadeFieldUnitCacheStrategy.getCollectorAndFieldNumber() creates temporary Team objects which can not be garbage collected.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)