View previous topic :: View next topic |
Author |
Message |
MPB3.Radio Trick Member
Joined: 05 Dec 2002 Location: P-Town |
0. Posted: Fri Mar 26, 2004 7:47 am Post subject: Markup Trimming |
|
|
I noticed that all the comments are still in the template's stylesheet. A lot of them are pretty long. I can imagine that removing all the CSS comments might reduce bandwidth consumption significantly given the amount of traffic the forum gets. There's also comment tags in the footer just before the copyright (the one telling people not to remove it). |
|
Back to top |
|
|
VxJasonxV Maniac Member
Joined: 08 Feb 2002 Location: Castle Rock, CO |
1. Posted: Fri Mar 26, 2004 10:09 am Post subject: |
|
|
Comments take up negligible bandwidth.
There's three issues that affect site performance:
1) CPU Load - Depending on the amount of rendering/processing that the server is doing, PHP Parsing, MySQL/PostGreSQL Querys, Apache handling, etc. may be a deal slower.
2) Network Bottlenecks - For the most part, this is usually out of our control, and this is controlled by the datacenter's upstream providers, etc. If any shell users are connected and transfering a lot of data, this may assist in clogging server's throughput. However, that doesn't happen very often. It will happen, but not very much.
3) This is really a part of CPU Load, but I wanted to spell this out seperately.
Comments matter little. I would estimate there is no more than 5K of comments on any given page.
HTML is rendered by your browser, all we have to do is send you the contents.
JavaScript is rendered by your computer/browser, all we have to do is send you the script.
CSS is rendered on HTML elements by your browser, all we have to do is send you the specification.
PHP you cannot see in our source, the server renders it into HTML, see HTML .
MySQL/PostGreSQL Querys are run as a part of PHP Processing, after completing the query, becomes result data in PHP, which the server renders into HTML, see HTML .
I think that's about what you'll find on any given page. Add in the transferring of pictures and such, and you have everything necessary. _________________
|
|
Back to top |
|
|
MPB3.Radio Trick Member
Joined: 05 Dec 2002 Location: P-Town |
2. Posted: Fri Mar 26, 2004 10:24 am Post subject: |
|
|
I was talking specifically about the comments in the page outputs, not the scripts so there's no need to address that. 5 extra kilobytes per complete transfer that is uncompressed (to my understanding) multiplied by the number of users accessing this board adds up and at a certain point it may no longer be negligible. If it's not an issue now, then I understand in which case I'm just being informative.
Also, I should add that I'm quite aware of process involved in phpBB, and HTTP in general. I run my own servers and sites so it's pretty safe to assume that I know what I'm talking about. Maybe I wasn't clear enough, in which case it's my fault, but for reference the last suggestion I made was taken and implemented by J Dogg making the forums significantly faster in observation. |
|
Back to top |
|
|
sherl0k Maniac Member
Joined: 27 Jan 2002 Location: the internet |
|
Back to top |
|
|
evn Staff Member
Joined: 23 Jan 2002 Location: Calgary AB |
4. Posted: Fri Mar 26, 2004 5:02 pm Post subject: |
|
|
Normally I wouldn't post in a locked thread, but just to add something:
CSS Files, and everything they point to are cached by the browser and in my experience they are rarely re-requested by a browser without a good reason. Example, here is a clip from the CSS sheet for my personal page:
Code: |
/*
This file is the default CSS for bsdbox/beastiebox.
<snip> a whole lot of styles/classes/selectors</snip>
*/
#pagecenter {
background-image:url('img/background.jpg');
width: 599px;
height: auto;
margin: auto;
margin-top: 0px;
margin-bottom: 0px;
text-align: left;
overflow: hidden;
}
|
If you visit my page, you would hit up index.php, your browser would parse it - find the link to Default.CSS and request that too, then it would parse default.css and request background.png
from that point on, any time you request a page on my site that needs "default.css" or background.png" it will just load them from your local cache. which is 0 cost in bandwidth, server resources. Ideally you would use CSS to do everything common on every page, you send that once and you're done with it. _________________
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB 2 © 2001, 2002 phpBB Group
|