简体   繁体   English

CodeIgniter项目非常慢

[英]CodeIgniter project very slow

I am busy with a CI project using CI3 & HMVC. 我正在忙于使用CI3和HMVC的CI项目。 I work during office hours at work, then take it home for weekend & after work development. 我在上班时间上班,然后在周末和下班后带回家。 Using the two machines has been working for a long time. 使用这两台机器已经工作了很长时间。 Monday morning, as normal I tried continuing from my weekend/home code and suddenly the project is super slow on my work machine but the machine has not changed. 星期一早上,像往常一样,我尝试从周末/家庭代码继续进行,突然我的工作机器上的项目速度非常慢,但是机器没有变。 It runs Suse Linux (php 5.6). 它运行Suse Linux(php 5.6)。 I wait forever for pages to load. 我永远等待页面加载。

The exact same code works perfectly at home. 完全相同的代码可在家中完美运行。 when I look at the log after trying to access just one page: 当我尝试仅访问一页后查看日志时:

INFO - 2016-08-02 09:44:23 --> Config Class Initialized
INFO - 2016-08-02 09:46:30 --> Final output sent to browser
DEBUG - 2016-08-02 09:46:30 --> Total execution time: 127.3685

One page takes almost two minutes to load. 一页加载将近两分钟。

Speed Up CodeIgniter Please Checkout Some Points 加快CodeIgniter的速度,请结点

  1. Compress HTML output 压缩HTML输出

  2. Enable Cache functions 启用缓存功能

  3. Enable Gzip Compression 启用Gzip压缩

I finally discovered what was wrong with my CI application. 我终于发现我的CI应用程序出了什么问题。 I have a JSON file that is used to store settings for each module. 我有一个JSON文件,用于存储每个模块的设置。 As soon as I remove the JSON file, the application is faster. 删除JSON文件后,应用程序就会更快。 I am still not sure why this is not a problem on my home PC. 我仍然不确定为什么家用PC上这不是问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM