OpenJPA
  1. OpenJPA
  2. OPENJPA-2164

Don't setPCState if field requested is already loaded

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1, 2.3.0
    • Fix Version/s: 2.2.1, 2.3.0
    • Component/s: Enhance, kernel, performance
    • Labels:
      None

      Description

      Currently, our getter method logic (enhanced byte code plus our statemanager code) has some unnecessary overhead when processing fields that have already been loaded. We're looking at streamlining that processing by using a simple check in the beforeRead method to determine if the field has already been loaded. If it has, then just return and let it return the value already present. If it has not been loaded, then we'll go through the normal processing.

        Issue Links

          Activity

          Kevin Sutter created issue -
          Hide
          Kevin Sutter added a comment -

          After a bit more experimentation and testing, we've decided to move this logic from beforeRead to accessingField. This can avoid even more of the processing path when the field being requested has already been loaded.

          Related to this change are some helper methods on the FieldMetaData and ClassMetaData.

          Show
          Kevin Sutter added a comment - After a bit more experimentation and testing, we've decided to move this logic from beforeRead to accessingField. This can avoid even more of the processing path when the field being requested has already been loaded. Related to this change are some helper methods on the FieldMetaData and ClassMetaData.
          Kevin Sutter made changes -
          Field Original Value New Value
          Link This issue is related to OPENJPA-2151 [ OPENJPA-2151 ]
          Hide
          Kevin Sutter added a comment -

          The two changes for openjpa-2151 and openjpa-2164 are overlapping a bit...

          Show
          Kevin Sutter added a comment - The two changes for openjpa-2151 and openjpa-2164 are overlapping a bit...
          Kevin Sutter committed 1307595 (1 file)
          Reviews: none

          OPENJPA-2164. Change the Savepoints testcase to be more consistent with the expectations of savepoints.

          Kevin Sutter committed 1307608 (1 file)
          Reviews: none

          OPENJPA-2164. If the field being requested is already loaded, then skip the overhead and just return the field value.

          Rick Curtis committed 1342641 (2 files)
          Hide
          Rick Curtis added a comment -

          Merged changes from trunk to 2.2.x.

          Show
          Rick Curtis added a comment - Merged changes from trunk to 2.2.x.
          Rick Curtis made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.3.0 [ 12319463 ]
          Fix Version/s 2.2.1 [ 12319943 ]
          Resolution Fixed [ 1 ]
          Hide
          Rick Curtis added a comment -

          There is on TODO in the that could probably be addressed.

          // TODO – what about version fields? Could probably UT this

          Show
          Rick Curtis added a comment - There is on TODO in the that could probably be addressed. // TODO – what about version fields? Could probably UT this
          Albert Lee made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Kevin Sutter
              Reporter:
              Kevin Sutter
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development