PDA

View Full Version : Slow Load Up with Minimum Modules


mudanoman
10-02-2004, 03:42 AM
Hey,

Portal page is loading quite slow despite only having a couple modules displayed. The portal can be viewed here: http://www.msdhw.com/forum/cmps_index.php . Any help or suggestions greatly appreciated.

Cheers,

Ivan

Artayick
10-02-2004, 10:06 AM
loads rather quick for me... do you plan to keep it like that or change it to just index.php might speed it up a tad..

Our Sponsors
 

Brian
10-02-2004, 10:17 AM
Seems to be loading just as quickly as your forum for me. Do you have the 'Quick Moderation' module enabled by chance? That can slow things down since it has to count so many tables, but will only affect the groups that have permission to see that module.

mudanoman
10-02-2004, 11:11 PM
I have the 'Quick Moderation' module deactivated. Its been loading quite slowly for me still and my members who are testing it are also reporting 4-5 second load times. Is there anything else I could do to make it load quicker? Thanks in advance. -Ivan

Our Sponsors
 

KW802
10-03-2004, 12:37 AM
I have the 'Quick Moderation' module deactivated. Its been loading quite slowly for me still and my members who are testing it are also reporting 4-5 second load times. Is there anything else I could do to make it load quicker? Thanks in advance. -Ivan
On my DSL connection the page is only taking a 2 second count to come up in IE. The only thing I'd suggestion doing is slicing up that main graphic so it doesn't have to load in the full 53K file at one shot for the dial-up users.

Brian
10-03-2004, 10:52 AM
I just registered an account and it still seems to be loading fine for me while logged in. You can try this though... Open your forum/includes/config.php file and add $debug = 1; just before the ?> at the end of the file. Then go to this link (http://www.msdhw.com/forum/cmps_index.php?explain=1) and post the results of that page here. Oh, and be sure to remove that code from your config file right afterwards as leaving it in there could be a security risk.

mudanoman
10-03-2004, 04:05 PM
Brian,

Here are the results from the debug:

Connecting to database
Time before: 0.0073630809783936
Memory Before: 355KB
Time after: 0.0082991123199463
Time taken: 0.00093603134155273
Memory After: 355KB



Query:

SELECT title, data
FROM datastore
WHERE title IN ('options', 'cron', 'forumcache', 'usergroupcache', 'stylecache', 'adv_modules', 'adv_portal_opts', 'attachmentcache', 'bbcodecache', 'birthdaycache', 'eventcache', 'iconcache', 'maxloggedin', 'smiliecache', 'userstats')

Time before: 0.0087211132049561
Memory Before: 356KB
Time after: 0.010771036148071
Time taken: 0.0020499229431152
Memory After: 356KB

table type possible_keys key key_len ref rows Extra
datastore range PRIMARY PRIMARY 15 15 where used

Parsing functions.php
Time before: 0.043158054351807
Memory Before: 448KB
Time after: 0.074060916900635
Time taken: 0.030902862548828
Memory After: 1,123KB



Processing sessions.php
Time before: 0.074764013290405
Memory Before: 1,127KB

Query:

SELECT *
FROM session
WHERE sessionhash = 'eac27d7066511bcc55b35addccdf90f6'
AND lastactivity > 1096833045
AND host = '66.75.246.85'
AND idhash = 'd0fc0411f4b3304fc782da7cb0661855'

Time before: 0.078435897827148
Memory Before: 1,192KB
Time after: 0.079171895980835
Time taken: 0.00073599815368652
Memory After: 1,192KB

table type possible_keys key key_len ref rows Extra
session const PRIMARY PRIMARY 32 const 1

Query:

SELECT
userfield.*, usertextfield.*, user.*, UNIX_TIMESTAMP(passworddate) AS passworddate,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid,
language.phrasegroup_calendar AS phrasegroup_calendar,
language.phrasegroup_adv_portal AS phrasegroup_adv_portal,
language.phrasegroup_postbit AS phrasegroup_postbit,
language.phrasegroup_global AS phrasegroup_global,
language.options AS lang_options,
language.languagecode AS lang_code,
language.charset AS lang_charset,
language.locale AS lang_locale,
language.imagesoverride AS lang_imagesoverride,
language.dateoverride AS lang_dateoverride,
language.timeoverride AS lang_timeoverride,
language.registereddateoverride AS lang_registereddateoverride,
language.calformat1override AS lang_calformat1override,
language.calformat2override AS lang_calformat2override,
language.logdateoverride AS lang_logdateoverride,
language.decimalsep AS lang_decimalsep,
language.thousandsep AS lang_thousandsep
FROM user AS user
INNER JOIN userfield AS userfield ON (user.userid = userfield.userid)
INNER JOIN usertextfield AS usertextfield ON (usertextfield.userid = user.userid) INNER JOIN language AS language ON (language.languageid = IF(user.languageid = 0, 1, user.languageid))
WHERE user.userid = 6

Time before: 0.080578088760376
Memory Before: 1,195KB
Time after: 0.084021091461182
Time taken: 0.0034430027008057
Memory After: 1,195KB

table type possible_keys key key_len ref rows Extra
language system PRIMARY 1
user const PRIMARY PRIMARY 4 const 1
userfield const PRIMARY PRIMARY 4 const 1
usertextfield const PRIMARY PRIMARY 4 const 1

End sessions.php processing
Time after: 0.087656021118164
Time taken: 0.012892007827759
Memory After: 1,195KB



Query:

SELECT calendarpermission.usergroupid, calendarpermission.calendarpermissions,calendar.calendarid,calendar.title, displayorder
FROM calendar AS calendar
LEFT JOIN calendarpermission AS calendarpermission ON (calendarpermission.calendarid=calendar.calendarid AND usergroupid IN(6))
ORDER BY displayorder ASC

Time before: 0.094249963760376
Memory Before: 1,307KB
Time after: 0.09537410736084
Time taken: 0.0011241436004639
Memory After: 1,306KB

table type possible_keys key key_len ref rows Extra
calendar ALL 2 Using temporary; Using filesort
calendarpermission range calendarid,usergroupid usergroupid 2 1 where used

Query:
SELECT * FROM adv_pages WHERE name = 'home'
Time before: 0.098350048065186
Memory Before: 1,326KB
Time after: 0.099061012268066
Time taken: 0.00071096420288086
Memory After: 1,327KB

table type possible_keys key key_len ref rows Extra
adv_pages system 1

Query:

SELECT * FROM style
WHERE (styleid = 1)
OR styleid = 1
ORDER BY styleid ASC
LIMIT 1

Time before: 0.10062003135681
Memory Before: 1,318KB
Time after: 0.10174894332886
Time taken: 0.0011289119720459
Memory After: 1,318KB

table type possible_keys key key_len ref rows Extra
style const PRIMARY PRIMARY 2 const 1

Query:

SELECT title, template
FROM template
WHERE templateid IN (6364,6368,6382,6370,6369,6375,6120,6374,0,6372,6052,6051,6231,6373,0,6351,6350, 6327,6206,6205,6216,6183,6184,6322,6325,6332,6202,6203,6204,6293,6337,6336,6343, 6342,6341,6338,6340)

Time before: 0.10516405105591
Memory Before: 1,373KB
Time after: 0.10742211341858
Time taken: 0.0022580623626709
Memory After: 1,373KB

table type possible_keys key key_len ref rows Extra
template range PRIMARY PRIMARY 4 36 where used

End call of global.php: 0.11612200737



Query:

SELECT user.avatarid, user.avatarrevision, avatarpath, NOT ISNULL(avatardata) AS hascustom, customavatar.dateline
FROM user AS user
LEFT JOIN avatar AS avatar ON avatar.avatarid = user.avatarid
LEFT JOIN customavatar AS customavatar ON customavatar.userid = user.userid
WHERE user.userid = 6
Time before: 0.14746308326721
Memory Before: 1,961KB
Time after: 0.14833903312683
Time taken: 0.00087594985961914
Memory After: 1,961KB

table type possible_keys key key_len ref rows Extra
avatar system PRIMARY 0 const row not found
user const PRIMARY PRIMARY 4 const 1
customavatar const PRIMARY PRIMARY 4 const 1

Query:
SELECT COUNT(*) AS count FROM post WHERE dateline >= '1096794519'
Time before: 0.14981698989868
Memory Before: 1,962KB
Time after: 0.28279209136963
Time taken: 0.13297510147095
Memory After: 1,961KB

table type possible_keys key key_len ref rows Extra
post ALL 29061 where used

Query:

SELECT

thread.threadid, thread.title, thread.replycount, postusername, postuserid, thread.dateline AS postdateline, IF(views <= thread.replycount, thread.replycount+1, views) AS views, thread.lastposter, thread.lastpost, pollid

,thread.forumid, forum.title AS forumtitle


FROM thread as thread

LEFT JOIN forum AS forum ON (thread.forumid = forum.forumid)

LEFT JOIN deletionlog AS deletionlog ON (thread.threadid = deletionlog.primaryid AND type = 'thread')

WHERE open <> '10' AND thread.visible = 1 AND thread.forumid IN (8, 9,10, 16, 11) AND deletionlog.primaryid IS NULL
ORDER BY lastpost DESC
LIMIT 3

Time before: 0.28806591033936
Memory Before: 1,984KB
Time after: 0.32749605178833
Time taken: 0.039430141448975
Memory After: 1,984KB

table type possible_keys key key_len ref rows Extra
thread range forumid forumid 4 3504 where used; Using filesort
forum eq_ref PRIMARY PRIMARY 2 thread.forumid 1
deletionlog eq_ref PRIMARY PRIMARY 5 thread.threadid,const 1 where used; Using index; Not exists

Query:

SELECT session.userid, username, usergroupid, (user.options & 512) AS invisible
FROM session AS session
LEFT JOIN user AS user USING (userid)
WHERE session.lastactivity > 1096833045
ORDER BY invisible ASC, username ASC

Time before: 0.34370899200439
Memory Before: 1,999KB
Time after: 0.34582710266113
Time taken: 0.0021181106567383
Memory After: 1,999KB

table type possible_keys key key_len ref rows Extra
session ALL 25 where used; Using temporary; Using filesort
user eq_ref PRIMARY PRIMARY 4 session.userid 1

Query:

SELECT
thread.threadid, thread.title, replycount, postusername, postuserid, thread.dateline AS postdateline, thread.lastposter, thread.lastpost, IF(views<=replycount, replycount+1, views) AS views, forumid, post.postid, pagetext, allowsmilie

,thread.iconid AS threadiconid, iconpath AS threadiconpath
, avatarpath, NOT ISNULL(avatardata) AS hascustom, customavatar.dateline AS avatardateline, avatarrevision

, attachment.filename, attachment.filesize, attachment.visible, attachmentid, counter, thumbnail, LENGTH(thumbnail) AS thumbnailsize
FROM thread AS thread
LEFT JOIN post AS post ON (post.postid = thread.firstpostid)
LEFT JOIN icon USING (iconid)
LEFT JOIN attachment AS attachment ON (post.postid = attachment.postid)
LEFT JOIN user AS user ON (user.userid = post.userid)



LEFT JOIN avatar as avatar ON (avatar.avatarid = user.avatarid)
LEFT JOIN customavatar as customavatar ON (customavatar.userid = user.userid)


LEFT JOIN deletionlog AS deletionlog ON (thread.threadid = deletionlog.primaryid AND type = 'thread')
WHERE forumid IN(40) AND thread.visible = 1 AND thread.open != 10 AND deletionlog.primaryid IS NULL
GROUP BY post.postid
ORDER BY postdateline DESC
LIMIT 4
Time before: 0.35452103614807
Memory Before: 2,017KB
Time after: 0.35749006271362
Time taken: 0.0029690265655518
Memory After: 2,017KB

table type possible_keys key key_len ref rows Extra
avatar system PRIMARY 0 const row not found
thread range forumid forumid 4 2 where used
post eq_ref PRIMARY PRIMARY 4 thread.firstpostid 1
icon eq_ref PRIMARY PRIMARY 2 post.iconid 1
attachment ref postid postid 4 post.postid 1
user eq_ref PRIMARY PRIMARY 4 post.userid 1
customavatar eq_ref PRIMARY PRIMARY 4 user.userid 1
deletionlog eq_ref PRIMARY PRIMARY 5 thread.threadid,const 1 where used; Using index; Not exists

Page generated in 0.42750 seconds with 12 queries,
spending 0.19075536727905 doing MySQL queries and 0.23674463272095 doing PHP things.

Shutdown Queries:

Query:

UPDATE user
SET lastactivity = 1096833945
WHERE userid = 6

Time before: 0.43197798728943
Memory Before: 2,064KB
Time after: 0.43271398544312
Time taken: 0.00073599815368652
Memory After: 2,062KB



Query:

UPDATE session
SET useragent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3', lastactivity = 1096833945, location = "/forum/cmps_index.php?explain=1", styleid = 0, bypass = 0
,inforum = 0, inthread = 0, incalendar = 0, badlocation = 0
WHERE sessionhash = 'eac27d7066511bcc55b35addccdf90f6'
Time before: 0.43302011489868
Memory Before: 2,062KB
Time after: 0.4334659576416
Time taken: 0.00044584274291992
Memory After: 2,062KB

I am using Mozilla Firefox Browser. Would that make a difference?

Peace,
Ivan

Brian
10-04-2004, 10:34 AM
Page generated in 0.42750 seconds with 12 queries

The page seems to be generated quickly enough, so it's something to do with your connection, or something other than the script.