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

static cache generation slower than before

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Medium Medium
    • 4.5.0alpha
    • 4.4.0
    • Misc
    • None
    • php5.3
      ez4.4
      CronjobCacheClear=enabled

    Description

      Hi

      The new code to generate static cache is a bit slower and consume more memory.
      than before.

      Flushing the cache of a folder with 30 nodes take more than 1s and generate more than 2000 mysql queries.

      First issue:
      In the file kernel/classes/ezstaticcache.php function storeCache
      following code
      foreach ( $this->cachedSiteAccesses as $cachedSiteAccess )
      $dirs[] = $this->buildCacheDirPath( $cachedSiteAccess );
      can be replace with
      if(!isset( $this->dirs) )

      { foreach ( $this->cachedSiteAccesses as $cachedSiteAccess ) $dirs[] = $this->buildCacheDirPath( $cachedSiteAccess ); $this->dirs= $dirs; }

      It will reduce the total time from 1s to 0.5s for the same result (I hope)

      Attachments

        Activity

          People

            unknown unknown
            scouzinier scouzinier
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: