i wanted to know somethings about the firebug, when i try to load a page with firebug opend, it start the time开发者_如何学JAVA lines.
what is :
waiting, reciving, DomContentLoaded, Load,
mysql queries what affect from the list ? i see that more mysql queries i am adding, the reciving part is increasing.
let me paste a request that ihave used on my core , to generate a dynamic link or content.
function getContent($id = '') {
$id = mysql_real_escape_string ($id);
$sql = 'SELECT id,post_title,post_content FROM wp_posts WHERE post_category="67" ORDER BY post_date DESC LIMIT 1';
$res = mysql_query($sql) or die (mysql_error());
if (mysql_num_rows($res) !=0):
while ($row = mysql_fetch_assoc($res)) {
// this remove caption from wordpress, get 450 words to be used for exerpt, encode html,
$mycontent = $row['post_content'];
$mycontent = strip_tags($mycontent);
$mycontent = substr($mycontent,0,250);
$mycontent = preg_replace("/\[caption.*\[\/caption\]/", '', $mycontent);
$mycontent = htmlentities($mycontent);
//encode the words for html
$title = $row['post_title'];
$title = htmlentities($title);
echo '
<<h1><a href="single.php?id='.$row['id'].'">'.$title.'</a> </h1>
<div class="cssclass"> '.$mycontent.' </div>
'; //echo
}
else:
echo 'This page dosnt exist.';
endif;
} // end
Is any thing wrong on this code or its normal, my db is about 75.000 lines.
Thank you for reading this post.
waiting: after sending a request to the server, this is the time spent waiting for data to start coming back
receiving: time spent receiving content
DomContentLoaded: time spent until the entirety of the DOM is availble (note, this is not all resources loaded, just the html portions, e.g. the </html>
tag has been received/processed).
load: time until the entirety of the page, including images/scripts/css has been received/processed/loaded.
Don't worry about the receiving portion increasing. You're outputting more data, so it'll take more time to receive. That's perfectly normal.
Waiting is the time between when the browser sends the request and receiving any data at all from the server.
Receiving is the time actually getting data.
The reason Receiving is longer is because you're sending more data, so it's taking longer to download. You might expect Waiting time to go up slightly too, but the time to transfer across the network is more significant than the time spent processing the data on the server.
精彩评论