search
HomeCMS TutorialDEDECMSHow to speed up dedeCMS content generation

How to speed up dedeCMS content generation

How to speed up the content generation speed of DedeCMS?

Everyone will often encounter this problem. If Weaver There are many documents in DreamBackend, and when the data is relatively large, generating column documents will be quite slow. Recently, the editor has been chatting with a friend about how to speed up dedecms generation. I think this is also a shortcoming of dedecms! For example, if a dedecms has hundreds of thousands or millions of visits, it will bring a lot of garbage to the website. This will lead to a decrease in dedemcs generation speed and ultimately lead to users not getting the best experience.

Recommended study: 梦Weavercms

I checked Baidu and found no good solution to this problem. Afterwards, the editor found a suitable piece of code from the dedecms official website. After being tested by the editor, the editor will briefly introduce the implementation method.

The first step is to enter the root directory of dedecms and find the next directory:

include/inc/inc_fun_SpGetArcList.php

After finding it, it is best to download it locally and open it to find the following code:

for($i=0;$i<$ridnum;$i++){ if($tpsql==””) $tpsql .= ” And ( (“.TypeGetSunID($reids[$i],$dsql,’arc’).” Or arc.typeid2=&#39;”.$reids[$i].”‘) “; else $tpsql .= ” Or (“.TypeGetSunID($reids[$i],$dsql,’arc’).” Or arc.typeid2=&#39;”.$reids[$i].”‘) “; }

After finding the above code You can comment out or replace the above code. Replace it with the following code:

for($i=0;$i<$ridnum;$i++){ if($tpsql==””) $tpsql .= ” And (“.TypeGetSunID($reids[$i],$dsql,’arc’); else $tpsql .= ” Or “.TypeGetSunID($reids[$i],$dsql,’arc’);

Find:

$orwhere .= " And ( arc.typeid in ($sonids) Or arc.typeid2 in ($sonids) ) "

and replace it with:

$orwhere .= " And arc.typeid in ($sonids) ";

Let’s look at the specific optimization of the generation. Steps:

1. Close the sub-column, and the generation speed is reduced from 50 seconds and 20 pages to 20 seconds and 20 pages.

2. Delete the label of the call document in the document template, that is, the label in the arclist With sort=rand, all caches that can be found in the background are enabled, and the generation speed drops from 20 seconds for 20 pages to more than 6 seconds for one page.

3. Delete related documents in the document template, and the generation speed jumps from 6 seconds. It dropped to less than one second, and the time to reach the middle was over. I was finally satisfied and no longer had to enjoy the slow generation speed!

The above is the detailed content of How to speed up dedeCMS content generation. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools