Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-29613

As a developer I want access to ContentType on Content to avoid re-loading it

    Details

      Description

      Like in EZP-28956 where getContent() was added on Location, this is about adding getContentType on Content to avoid having to deal with loading logic and also further more to avoid repeated loads of content types in the system when we already have the Type (as we need it to build Content) and can thus pass it around on Content Items.

      This implicit involves improving performance:

      • No repeated content types loading when calling field functions in Twig, as they can now use the provided type info
        • No implicit repeated loads for same language when having to build these content types over and over
      • Add possibility to bulk load ContentTypes in SPI in order to handle this even more efficient when bulk loading content (either bulk load or on Location/Content Search results)

      The issue where hidden in 5.x / 1.x due to inMemory cache feature in Stash, which we don't (yet) have re-introduced in 2.x. When we do re-introduce it it will be in a way that it is safe also for long running scripts and don't eat up all available memory until it crashes.

        Issue Links

          Activity

          Show
          André Rømcke added a comment - Merged for 2.4: https://github.com/ezsystems/ezplatform-admin-ui/commit/0e07bc2fc936a4a50d1941a736c30d7bfb0b9fe4 https://github.com/ezsystems/ezpublish-kernel/commit/0dc4f6383f1e78593170ef4635aaa8ebf620e1c6 Suggested release doc change: https://github.com/ezsystems/developer-documentation/pull/470/files#r238722986
          Hide
          Michał Szołtysek added a comment -

          QA Approved.

          Show
          Michał Szołtysek added a comment - QA Approved.
          Show
          André Rømcke added a comment - - edited PR: https://github.com/ezsystems/ezpublish-kernel/pull/2444 And once that is approved: https://github.com/ezsystems/ezplatform-admin-ui/pull/633

            People

            • Assignee:
              Unassigned
              Reporter:
              André Rømcke
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: