简体   繁体   English

杂货CRUD ajax表现

[英]Grocery CRUD ajax performance

I'm using Grocery Crud(1.4.1) with CI 2.1.4. 我正在使用带有CI 2.1.4的Grocery Crud(1.4.1)。 The Grocery Crud worked in my local environment and our internal staging server. Grocery Crud在我的本地环境和我们的内部登台服务器中工作。 However, when we deployed the project to the live server, we ran into the performance issue. 但是,当我们将项目部署到实时服务器时,我们遇到了性能问题。 The pages which contains Grocery Crud loaded really slowly. 包含Grocery Crud的页面加载速度非常慢。 Other pages (like login-check with db to login) is good for us. 其他页面(如使用db登录检查登录)对我们有好处。 I have checked the "Network" panel in Chrome, looks like the Ajax calls like "ajax_list_info", "ajax_list" took a really long time to be completed (in our case is 30s). 我检查了Chrome中的“网络”面板,看起来像“ajax_list_info”之类的Ajax调用,“ajax_list”花了很长时间才完成(在我们的例子中是30秒)。 Please see the screenshot below: 请看下面的截图: 在此输入图像描述

I think there might be something with the live server configuration which blocked the Grocery Crud's performance. 我认为实时服务器配置可能会阻止Grocery Crud的性能。 However, wanted to ask if anyone else has met this issue? 但是,想问一下是否有其他人遇到过这个问题?

Thanks for the people who helped me with this issue. 感谢帮助我解决这个问题的人。 As I mentioned in the question, this issue does relate to our live server configuration. 正如我在问题中提到的,此问题与我们的实时服务器配置有关。 The PHP code: PHP代码:

session_start();

After we removed this line (we are using CodeIgniter's session library, so PHP session_start function is a redundant line in our code....), the application's performance was getting much better. 在我们删除了这一行之后(我们使用CodeIgniter的会话库,因此PHP session_start函数在我们的代码中是一个冗余行....),应用程序的性能变得更好。

I'm new in PHP coding, and this one teaches me that if something slows the application performance, always look into the code you wrote first. 我是PHP编码的新手,这个教会我,如果某些东西减慢了应用程序性能,请始终查看您首先编写的代码。

Thanks guys. 多谢你们。

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

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