Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-1151

Cache the current-time timestamp in AbstractQueryCache.onTypesChanged()

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.3.0, 2.0.0
    • 1.3.0, 2.0.0-M3
    • jdbc
    • None
    • Patch Available

    Description

      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.

      Attachments

        1. OpenJPA-trunk-JIRA1151.patch
          20 kB
          Jody Grassel
        2. OpenJPA-trunk-JIRA1151-tests.patch
          20 kB
          Jody Grassel

        Activity

          People

            drwoods Donald Woods
            fyrewyld Jody Grassel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: