Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3766

remove struts.freemarker.mru.max.strong.size from default.properties

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 2.3.8
    • None
    • Important

    Description

      if struts.freemarker.mru.max.strong.size > 0 ,freemarker will use MruCacheStorage instead of SoftCacheStorage,and MruCacheStorage is not concurrent,it will synchronized on every call,it will affect performance.

      in TemplateCache:

      CachedTemplate cachedTemplate;
      if(isStorageConcurrent) {
          cachedTemplate = (CachedTemplate)storage.get(tk);
      }
      else {
          synchronized(storage) {
             cachedTemplate = (CachedTemplate)storage.get(tk);
          }
      }
      

      please remove struts.freemarker.mru.max.strong.size from default.properties lets developers make their own choice.
      a better solution is implements a concurrent MruCacheStorage for struts2

      Attachments

        Activity

          People

            lukaszlenart Lukasz Lenart
            quaff Yanming Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: