openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dick (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-1151) Cache the current-time timestamp in AbstractQueryCache.onTypesChanged()
Date Tue, 30 Jun 2009 23:56:47 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-1151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725853#action_12725853
] 

Michael Dick commented on OPENJPA-1151:
---------------------------------------

I'm not sure about the testcases included in the patch - they didn't merge cleanly for me.
I have committed the timestamp caching portion of the fix though. 

> Cache the current-time timestamp in AbstractQueryCache.onTypesChanged()
> -----------------------------------------------------------------------
>
>                 Key: OPENJPA-1151
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1151
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: jdbc
>            Reporter: Jody Grassel
>            Priority: Trivial
>         Attachments: OpenJPA-trunk-JIRA1151.patch
>
>
> AbstractQueryCache.java contains the following block:
>            for (Object o: changedTypes) {
>                 String name = ((Class) o).getName();
>                 if(!changedClasses.containsKey(name))
>                     changedClasses.put(name, 
>                         new Long(System.currentTimeMillis()));
>             }
> Suggesting caching the Long containing the entity type's last-modification timestamp
outside of the for-loop to improve performance and reduce memory usage.

-- 
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