mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Performance improvement for thumb.php
This commit is contained in:
@@ -27,6 +27,7 @@ define('e107_INIT', true);
|
|||||||
// error_reporting(E_ALL);
|
// error_reporting(E_ALL);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
error_reporting(0); // suppress all errors or image will be corrupted.
|
error_reporting(0); // suppress all errors or image will be corrupted.
|
||||||
ini_set('gd.jpeg_ignore_warning', 1);
|
ini_set('gd.jpeg_ignore_warning', 1);
|
||||||
//require_once './e107_handlers/benchmark.php';
|
//require_once './e107_handlers/benchmark.php';
|
||||||
@@ -101,7 +102,8 @@ class e_thumbpage
|
|||||||
require_once(realpath(dirname(__FILE__).'/'.$CLASS2_INCLUDE));
|
require_once(realpath(dirname(__FILE__).'/'.$CLASS2_INCLUDE));
|
||||||
}
|
}
|
||||||
|
|
||||||
ob_clean(); // Precaution - clearout utf-8 BOM or any other garbage in e107_config.php
|
|
||||||
|
ob_end_clean(); // Precaution - clearout utf-8 BOM or any other garbage in e107_config.php
|
||||||
|
|
||||||
$tmp = $self.'/'.$HANDLERS_DIRECTORY;
|
$tmp = $self.'/'.$HANDLERS_DIRECTORY;
|
||||||
|
|
||||||
@@ -292,6 +294,8 @@ class e_thumbpage
|
|||||||
// Send required headers
|
// Send required headers
|
||||||
//$this->sendHeaders($thumbnfo);
|
//$this->sendHeaders($thumbnfo);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@readfile(e_CACHE_IMAGE.$fname);
|
@readfile(e_CACHE_IMAGE.$fname);
|
||||||
//$bench->end()->logResult('thumb.php', $_GET['src'].' - retrieve cache');
|
//$bench->end()->logResult('thumb.php', $_GET['src'].' - retrieve cache');
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user