Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-5439

Apply performance optimization to blocks report

    XporterXMLWordPrintable

    Details

    • Type: Task
    • Status: CLOSED
    • Priority: Should have
    • Resolution: Released
    • Affects Version/s: None
    • Fix Version/s: 2.39.1
    • Labels:
      None
    • Story Points:
      2
    • Sprint:
      Sprint #144
    • Section:
      Blocks (all), Performance
    • P4 site:
      All sites
    • Track:
      Development
    • Repositories:
      planet4-master-theme, planet4-plugin-gutenberg-blocks

      Description

      We can speed up the query that is used to generate the blocks report quite a lot by adding a condition on the post type to it, searching only through types post, page and campaign EDIT: so that it only searches types that could have blocks (NROs could have other types with blocks, we can get these types dynamically when doing the query).

      Doing so the blocks report on test-deimos (which has data from international) went from around 20 seconds to load, to around 5. The speed improvement will differ for each NRO, depending on how many posts of other types are in the database.

      branch: https://github.com/greenpeace/planet4-plugin-gutenberg-blocks/compare/faster-blocks-report

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              pvincent Pieter Vincent
              Reporter:
              pvincent Pieter Vincent
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: