2012-10-06 297 views
1

我正在開發使用PHP,Smarty的和MySQL網站。加載網站的視圖部分需要很長時間。我可以快速地從數據庫中獲取並查看數據,問題在於顯示部分。視圖部分花費太多時間來加載

http://jobsgang.com/c0b0dfc2379f0379d546b727/Kerala_jobs/Kozhikode_jobs/Other_Places_in_Kozhikode_jobs/Engineering_Projects_jobs/Engineer_jobs/btech_be_jobs/experienced_jobs/permanent_jobs/We_are_looking_for_Fresh_Talented__Project_Management_Tranies.html 

您可以在這裏看到來自php的數據。它會快速加載,但網站的顯示部分需要很長時間。

請幫我解決這個問題

+2

這麼長的地址? –

+1

我認爲這是與URL的長度沒有問題。這不是問題。你可以看到PHP放在那裏。 –

+0

您是否嘗試過與分析等Xdebug的? –

回答

3

這與PHP無關,你有一些Crazy ajax調用該頁面,就像每秒調用一個不存在的頁面。

enter image description here

刪除以下腳本

<script type="text/javascript" src="http://s7.addthis.com/js/300/addthis_widget.js#pubid=xa-506aa6a401ec5bef"></script> 
+0

親愛的爸爸,感謝您的寶貴建議。我怎樣才能找出那個瘋狂的ajax電話?請重播 –

+0

我在htacess爲ErrorDocument的404 http://jobsgang.com/404.php有一個代碼。這是造成這個問題嗎? –

+0

不,這不是問題..你的腳本試圖調用一個不存在的頁面,所以它的芳香性重定向到'jobsgang.com/404.php' – Baba

0

由於是需要如此長的渲染,你應該調試視圖部分:

如果你使用Smarty的,並有許多模板被渲染–是可能是一個原因。嘗試在smarty中啓用緩存。

也打開smarty調試控制檯,並檢查是否需要大量的時間進行渲染。

+1

Smarty的chaches automagicly – EaterOfCode

0
<script>(function(d, s, id) { 
    var js, fjs = d.getElementsByTagName(s)[0]; 
    if (d.getElementById(id)) return; 
    js = d.createElement(s); js.id = id; 
    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; 
    fjs.parentNode.insertBefore(js, fjs); 
}(document, 'script', 'facebook-jssdk'));</script> 

這是烏拉圭回合的根本問題all.js是弗裏茨

1

這是鍍鉻的結果,也與建議它,

**Combine external JavaScript (6)** 
There are multiple resources served from same domain. Consider combining them into as 
few files as possible. 
6 JavaScript resources served from epbkomalpdcfielganbfombgchcdebfg. 

**Enable gzip compression (13)** 
Compressing the following resources with gzip could reduce their transfer size by about  
two thirds (~638.28KB): 
css could save ~188B 
container.html could save ~4.37KB 
container.css could save ~23.98KB 
jquery.js could save ~66.14KB 
jsonStringify.js could save ~3.96KB 
jquery-ui.custom.js could save ~304.30KB 
jquery.additions.js could save ~2.05KB 
jquery.batchImageLoad.js could save ~1.44KB 
container.js could save ~196.65KB 
chrome-extension://epbkomalpdcfielganbfombgchcdebfg/initData.json could save ~1.29KB 
xd_arbiter.php could save ~16.80KB 
xd_arbiter.php could save ~16.80KB 
about.css could save ~305B 

**Leverage browser caching (18)** 
The following resources are explicitly non-cacheable. Consider making them cacheable if  
possible: 
We_are_looking_for_Fresh_Talented__Project_Management_Tranies.html 
container.html 
container.css 
jquery.js 
jsonStringify.js 
jquery-ui.custom.js 
jquery.additions.js 
jquery.batchImageLoad.js 
container.js 
chrome-extension://epbkomalpdcfielganbfombgchcdebfg/initData.json 
endSeperator.gif 
expend.png 
arrow_down.png 
addApp.png 
seperator.png 
xd_arbiter.php 
xd_arbiter.php 
about.css 

**Leverage proxy caching (5)** 
The following publicly cacheable resources contain a Set-Cookie header. This security 
vulnerability can cause cookies to be shared by multiple users. 
style.css 
pagination.css 
jquery-1.4.2.min.js 
ajaxSignUp.js 
all.js 

**Minimize cookie size** 
The average cookie size for all requests on this page is 27B 

**Specify image dimensions (1)** 
A width and height should be specified for all images in order to speed up page 
display. The following image(s) are missing a width and/or height: 
lock.png (5 uses) 
Web Page Performance 
**Optimize the order of styles and scripts (4)** 
The following external CSS files were included after an external JavaScript file in the 
document head. To ensure CSS files are downloaded in parallel, always include external 
CSS before external JavaScript. 
about.css 
3 inline script blocks were found in the head between an external CSS file and another 
resource. To allow parallel downloading, move the inline script before the external CSS 
file, or after the next resource. 

**Remove unused CSS rules (510)** 
78.97KB (88%) of CSS is not used by the current page. 
style.css: 17.28KB (78%) is not used by the current page. 
pagination.css: 692B (76%) is not used by the current page. 
Inline block #1: 3.63KB (88%) is not used by the current page. 
Inline block #2: 11.95KB (85%) is not used by the current page. 
about.css: 447B (100%) is not used by the current page. 
container.css: 31.69KB (92%) is not used by the current page. 
Inline block #3: 28B (11%) is not used by the current page. 
Inline block #4: 13.28KB (98%) is not used by the current page. 

**Use normal CSS property names instead of vendor-prefixed ones (6)** 
We_are_looking_for_Fresh_Talented__Project_Management_Tranies.html 
about.css 
data:text/html,chro… 
__________________________ chrome- 
extension://epbkomalpdcfielganbfombgchcdebfg/js/contentScript.js:12120 
|   02:05:57   | chrome- 
extension://epbkomalpdcfielganbfombgchcdebfg/js/contentScript.js:12121 
Init chrome extension communication chrome- 
extension://epbkomalpdcfielganbfombgchcdebfg/js/contentScript.js:12124 
__________________________ chrome- 
extension://epbkomalpdcfielganbfombgchcdebfg/js/contentScript.js:12120 
|   02:05:57   | chrome- 
extension://epbkomalpdcfielganbfombgchcdebfg/js/contentScript.js:12121 
Init chrome extension communication chrome- 
extension://epbkomalpdcfielganbfombgchcdebfg/js/contentScript.js:12124 
__________________________ container.js:569 
|   02:05:59   | container.js:570 
Init chrome extension communication container.js:573 
__________________________ container.js:569 
|   02:05:59   | container.js:570 
Initializing main toolbar container container.js:573 
FB.getLoginStatus() called before calling FB.init(). all.js:54 
__________________________ chrome- 
extension://epbkomalpdcfielganbfombgchcdebfg/js/contentScript.js:12120 
|   02:06:00   | chrome- 
extension://epbkomalpdcfielganbfombgchcdebfg/js/contentScript.js:12121 
Init chrome extension communication chrome- 
extension://epbkomalpdcfielganbfombgchcdebfg/js/contentScript.js:12124 
__________________________ chrome- 
extension://epbkomalpdcfielganbfombgchcdebfg/js/contentScript.js:12120 
|   02:06:00   | chrome- 
extension://epbkomalpdcfielganbfombgchcdebfg/js/contentScript.js:12121 
Init chrome extension communication chrome- 
extension://epbkomalpdcfielganbfombgchcdebfg/js/contentScript.js:12124 
__________________________ chrome- 
extension://epbkomalpdcfielganbfombgchcdebfg/js/contentScript.js:12120 
|   02:06:00   | chrome- 
extension://epbkomalpdcfielganbfombgchcdebfg/js/contentScript.js:12121 
Init chrome extension communication chrome- 
extension://epbkomalpdcfielganbfombgchcdebfg/js/contentScript.js:12124 
__________________________ chrome- 
extension://epbkomalpdcfielganbfombgchcdebfg/js/contentScript.js:12120 
|   02:06:00   | chrome- 
extension://epbkomalpdcfielganbfombgchcdebfg/js/contentScript.js:12121 
Init chrome extension communication chrome- 
extension://epbkomalpdcfielganbfombgchcdebfg/js/contentScript.js:12124 

,並期待在文本紅色,

enter image description here

相關問題