openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christiaan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-441) Memory increase when deleting objects
Date Tue, 27 Nov 2007 10:06:43 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545776
] 

Christiaan commented on OPENJPA-441:
------------------------------------

I had a closer look at this issue. With the supplied testcase I got the following output:
Memory usage before commit 15MB
Memory usage after commit 29MB (but before gc())

As you can see in the attached results, during commit (not in pm.deletePersistentAll()) there
is a peak in memory usage (memory usage is doubled). After commit and garbage collection the
memory usage drops to it's original level, so there is no memory usage across transaction
commit boundary.

The peak in memory usage is mainly due to the data stored in RowImpl, especially the generated
sql for the deletion (RowImpl.getDeleteSql()) stored in the _sql attribute, which on it's
turn is triggered by the sorting in the AutoOrderUpdateManager. All instances of the RowImpl
are collected in a collection attribute of RowManagerImpl. Not sure whether this is as designed,
but I can imagine things can be optimized since there are only two sql statements necessary
in this case: the delete for the component table and the delete for the relationship table.


> Memory increase when deleting objects
> -------------------------------------
>
>                 Key: OPENJPA-441
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-441
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.0.0
>         Environment: Kodo 4.1.4, JDK 6, ms sql server 2005, JTDS 1.2
>            Reporter: Christiaan
>         Attachments: results.ZIP, TestCaseMemoryAndDelete.zip
>
>
> This isssue is based on issue:
> http://issues.apache.org/jira/browse/OPENJPA-439
> When executing a delete on objects which all have been loaded into memory, the memory
usage is doubled when calling pm.deletePersistentAll().
> The same testcase can be used which is attached to the linked issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message