04-Oct-2013, 11:19 AM
Hello,
I have a 200 page flatfile site which uses includes to get some of the side panel content, menu etc. I wanted to check that the way I do my commentics is efficient for performance and if there wasn't something obvious I should do differently
top of page:
I had gzhandler in there before coming to commentics, it's gzip compression for performance.
I call all CSS in one file and don't have the seperate css call in these files.
After head and menu I hardcode identifier, reference, path, define in commentics and parse for url which I use to display socials. Socials similar to commentics calling in the graphics there so I don't have multiple ones to maintain.
Then a php bloc to get # of comments on its own (thank you Steven) so I can show that in orange at the top of the page and use a local anchor to let people jump there.
Finally at the bottom of the page the cmtx_form itself, slimmed down for performance.
Finally an sitewide right hand side include that has a SQL query getting the last 5 comments and page hrefs
At the end this, don't know if it's helpful though:
example here (note, in progress site, not ready yet). Load times seems to vary quite a bit, it's on a shared server so maybe other stuff is eating CPU. But between .5 and 10s. I'm not unhappy just want to make sure I'm not doing anything bonkers. Basically just after any thoughts that SQL and PHP propeller heads might have, am I committing any cardinal sins here performance wise or does this look ok.
Thx!!
I have a 200 page flatfile site which uses includes to get some of the side panel content, menu etc. I wanted to check that the way I do my commentics is efficient for performance and if there wasn't something obvious I should do differently
top of page:
Code:
<?php
session_start();
ob_start();
ob_start("ob_gzhandler");
?>
I had gzhandler in there before coming to commentics, it's gzip compression for performance.
I call all CSS in one file and don't have the seperate css call in these files.
After head and menu I hardcode identifier, reference, path, define in commentics and parse for url which I use to display socials. Socials similar to commentics calling in the graphics there so I don't have multiple ones to maintain.
Then a php bloc to get # of comments on its own (thank you Steven) so I can show that in orange at the top of the page and use a local anchor to let people jump there.
Finally at the bottom of the page the cmtx_form itself, slimmed down for performance.
Finally an sitewide right hand side include that has a SQL query getting the last 5 comments and page hrefs
At the end this, don't know if it's helpful though:
Code:
<?php
ob_flush();
ob_flush();
ob_clean();
ob_end_flush();
?>
example here (note, in progress site, not ready yet). Load times seems to vary quite a bit, it's on a shared server so maybe other stuff is eating CPU. But between .5 and 10s. I'm not unhappy just want to make sure I'm not doing anything bonkers. Basically just after any thoughts that SQL and PHP propeller heads might have, am I committing any cardinal sins here performance wise or does this look ok.
Thx!!