castor
  1. castor
  2. CASTOR-1538

Improvement of XMLClassDescriptorResolverImpl

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.3
    • Component/s: XML
    • Labels:
      None
    • Number of attachments :
      2

      Description

      Based on the changes suggested by issue 1508 do some additional improvements in the XMLClassDescriptorResolver to

      1. further improve performance
      2. unify the different "resolve" methods
      3. unify the caching of descriptors

      The provided patch introduces a ClassCache to keep track of missing classes (replacing the _classNotFoundList / saveClassNotFound / ClassNotFoundException mechanism).

      Similarities in the different "resolve(Class | className)" methods have been extracted. They now delegate to a single "getDescriptor" method.

      Caching of already loaded descriptors is now located in a DescriptorCache, which encapsulates loading of package mapping files, CDR files, finding descriptors by class name and by XML name.

      The performance improvement shown on my computer is about 15 - 20% according to the test provided with issue 1508.

        Issue Links

          Activity

          Hide
          Steven Dolg added a comment -

          The first patch seems to wrong. Somehow it is not applicable.

          The new patch should work.
          Sorry, if this caused any inconveniences.

          Show
          Steven Dolg added a comment - The first patch seems to wrong. Somehow it is not applicable. The new patch should work. Sorry, if this caused any inconveniences.
          Hide
          Werner Guttmann added a comment -

          Thanks, Steven, for the updated patch.

          Show
          Werner Guttmann added a comment - Thanks, Steven, for the updated patch.

            People

            • Assignee:
              Werner Guttmann
              Reporter:
              Steven Dolg
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 20 minutes
                20m