parse time hellow Hoe noemt de functie in PHP die de parsetime van een paginateruggeeft? (zoals op de prijswatch, staat er ook "parsetime:...secs") Tnx |
at the end of the page <? $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $endtime = $mtime; $totaltime = round(($endtime - $starttime), 4); print "Parsetime: $totaltime s »"; ?> also have to put something in the header , if I'm not mistaken, don't know what exactly |
Parsetime: 1042315631.1495 s der scheelt ergens iets denk ik :-) (I think there's something wrong :-) ) |
you have to put something at the top of the page.. trying to find what google answers all questions: http://www.sitemasters.be/index.php?...cripten&id=114 example: http://www.madshrimps.be/?action=test this piece at the top $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $starttime = $mtime; this piece at the bottom $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $endtime = $mtime; $totaltime = ($endtime - $starttime); printf("<center><font size=-1>Parsetime: %f seconden.</font></center> ", $totaltime); |
found the answer ^^ |
thanks! |
you're welcome bro where are you gonna put the code ? |
Quote:
(main, viewthreads & viewreplies) Found out that I need to work on database structure.. (parsetime of main page = 1,5 secs..) => Server always has to find the max(postdate/time+username) of a post of a thread in a forum... The more posts/threads, the slower the mainpage will become.. But I'm going to begin on v3.0 of my forum.. At this moment I'm finding the week points of the current version.. v3.0 is gonna kick *** :grin: MOD: could you add the code to the mainpage of the forum to see what's the parsetime of this forum's mainpage? |
Quote:
vB mixed php code with alot of stylesheets and templates put in a mysqldatabase not really worth the trouble, will only risk to break it |
Quote:
|
All times are GMT +1. The time now is 13:04. |
Powered by vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO