Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-4268

ResourceBundleMapWrapper memory usage improvement

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: Trunk
    • Component/s: framework

      Description

      Hello,
      We are working on performance improvements while load testing the application, and I noticed that ResourceBundleMapWrapper uses arounbd 140 Ko per Serving thread, in our configuration with around 1000 thread, this is a big memory impact.
      I started investigating the class and code seems strange to me, in fact I don't understand why InternalRbmWrapper constructor copies creates a Map by copying content of ResourceBundle.
      Why not only have a reference and delegate calls to the ResourceBundle ?
      Furthermore since put methods throw RuntimeException, I really don't see any case where the Map will change.
      I made a test removing this code and delegating to resourceBundle and it seems OK.

      If someone knows why it was made like that I would really be interested, if there is no reason I will submit a patch

      Thank you
      Regards
      Philippe
      http://www.ubik-ingenierie.com

        Attachments

        1. patch-OFBIZ-4268.patch
          6 kB
          Philippe Mouawad

          Activity

            People

            • Assignee:
              jleroux Jacques Le Roux
              Reporter:
              p.mouawad@ubik-ingenierie.com Philippe Mouawad
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: