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

minor cluster performance improvement: reduce file inclusions in index_image.php

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Obsolete
    • Icon: Medium Medium
    • None
    • 4.0.1
    • Legacy > Clustering
    • None

    Description

      I'd suggest to change the contents of index_image.php, turning it from a file to be included to a sample file to be copied and edited.
      This will make one less include call for every image/binary object served.

      Example of such a file:

      <?php
      /*
      This file should be copied into a new file and then edited to have correct clustering database settings.
      
      Here are sample contents of the configuration settings:
      -------------------------------------------
      
      define( 'STORAGE_BACKEND',     'mysql'           );
      define( 'STORAGE_HOST',        'db'              );
      define( 'STORAGE_PORT',        3306              );
      define( 'STORAGE_SOCKET',      '/tmp/mysql.sock' );
      define( 'STORAGE_USER',        'fred'            );
      define( 'STORAGE_PASS',        'secret'          );
      define( 'STORAGE_DB',          'cluster'         );
      define( 'STORAGE_CHUNK_SIZE',  65535             );
      
      -------------------------------------------
      */
      
      if ( !defined( 'STORAGE_BACKEND' ) || STORAGE_BACKEND == '' )
      {
          header( $_SERVER['SERVER_PROTOCOL'] . " 500 Internal Server Error" );
          die( "No storage backend chosen.\n" );
      }
      require( 'index_image_' . STORAGE_BACKEND . '.php' );
      ?>
      

      Attachments

        Activity

          People

            unknown unknown
            72f8acac-185f-4a54-9470-a7473f50daab@accounts.ibexa.co Gaetano Giunta
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: