SELECT p.id, p.autor, p.date, p.short_story, CHAR_LENGTH(p.full_story) as full_story, p.xfields, p.title, p.category, p.alt_name, p.comm_num, p.allow_comm, p.fixed, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.view_edit, e.editdate, e.editor, e.reason FROM dle_post p INNER JOIN (SELECT DISTINCT(dle_post_extras_cats.news_id) FROM dle_post_extras_cats WHERE cat_id IN ('53')) c ON (p.id=c.news_id) LEFT JOIN dle_post_extras e ON (p.id=e.news_id) WHERE approve=1 ORDER BY fixed desc, news_read DESC LIMIT 96,24;
$mobile_detect = new Mobile_Detect; if ( $mobile_detect->isMobile() ) { $this->smartphone = true; $this->desktop = false; } if ( $mobile_detect->isTablet() ) { $this->smartphone = false; $this->desktop = false; $this->tablet = true; } if( $mobile_detect->isiOS() ){ $this->ios = true; } if( $mobile_detect->isAndroidOS() ){ $this->android = true; }
case 'Mobile_Detect': include_once (DLEPlugins::Check(ENGINE_DIR . '/classes/mobiledetect.class.php')); break;
Родной шаблон: 0,386288с С вырезанным Mobile_Detect: 0,077019с
(общее время | время БД | время шаблонов) 0.524 | 0.378 | 0.039 0.496 | 0.358 | 0.042 0.526 | 0.380 | 0.036
0.099 | 0.021 | 0.014 0.100 | 0.023 | 0.015 0.095 | 0.024 | 0.016