db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3004) Get rid of the finalizer in EmbedResultSet
Date Thu, 16 Aug 2007 07:09:32 GMT

     [ https://issues.apache.org/jira/browse/DERBY-3004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Knut Anders Hatlen updated DERBY-3004:

    Attachment: d3004.stat

Attaching a fix for this issue. The patch removes EmbedResultSet.finalize() and adds EmbedStatement.finalize().
The new finalizer checks whether EmbedStatement contains a reference to a ResultSet, and if
it does and the ResultSet has a single-use activation, the activation is marked as unused.
If the ResultSet is no longer referenced by the EmbedStatement, it means that it has been
closed already and no clean-up action is needed.

Derbyall and suites.All ran cleanly (except a failure in lang/compressTable.sql which is also
seen in the tinderbox).

> Get rid of the finalizer in EmbedResultSet
> ------------------------------------------
>                 Key: DERBY-3004
>                 URL: https://issues.apache.org/jira/browse/DERBY-3004
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC, Performance
>    Affects Versions:
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d3004.diff, d3004.stat
> Finalizers make object allocation and garbage collection more expensive and should be
avoided for object types that are frequently allocated. EmbedResultSet has a finalize() method
and is frequently allocated for many types of load. The following comment was posted on DERBY-1876:
> By commenting out the finalize() method in EmbedResultSet, the time to run the test on
my laptop is reduced from ~3 seconds to ~1.3 seconds (OpenSolaris, Sun Java SE 6). Since the
finalizer is a no-op if the activation isn't single-use, I think we should investigate whether
there are ways to avoid this cost for ResultSets that don't need the finalizer.

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

View raw message