Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-11343

Reduce footprint due to RootBeanDefinition

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Complete
    • 3.2.6, 4.0 GA
    • 3.2.7, 4.0.1
    • None
    • None
    • true

    Description

      Related to SPR-7491
      RootBeanDefinition members (externallyManagedConfigMember, externallyManagedInitMethods,externallyManagedDestroyMethods) are initialized even if not in use.
      Setting ConcurrentHashMap initial size as 0 is not good enough it still allocates a map with ~ 10 empty elements.

      Should delay the initialization.

      For example -

      public void registerExternallyManagedConfigMember(Member configMember) {
      if (externallyManagedConfigMembers == null)

      { externallyManagedConfigMembers = new ConcurrentHashMap<Member, Boolean>(0); }

      this.externallyManagedConfigMembers.put(configMember, Boolean.TRUE);
      }

      public boolean isExternallyManagedConfigMember(Member configMember) {
      if (externallyManagedConfigMembers == null)

      { return false; }

      return this.externallyManagedConfigMembers.containsKey(configMember);
      }

      Attachments

        Issue Links

          Activity

            People

              juergen.hoeller Juergen Hoeller
              adib AdiB
              Spring Issues Spring Issues
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                3 years, 38 weeks, 1 day ago