Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-6318

Remove repeated retrieval of ValueMap when adapting a model class with multiple ValueMap injections

    XMLWordPrintableJSON

Details

    Description

      In an offline discussion with radu.cotescu, he expressed a concern about how if you have a model class (or interface) with a number of ValueMap-based injections it would end up calling Resource.adaptTo(ValueMap.class) multiple times.

      While I think this may be primarily an issue for the Resource implementation to solve for, it is true that the effective code executed by Sling Models is going to be less efficient in this case than manual construction of the object.

      So I think it is worth exploring.

      Attachments

        1. SLING-6318.diff
          19 kB
          Justin Edelson

        Activity

          People

            justinedelson Justin Edelson
            justinedelson Justin Edelson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: