A question of bandwidth and loading times

Busy's picture

He has: 6,151 posts

Joined: May 2001

I guess this is one of those questions you wonder about but never really bother to ask, so I'm asking now Wink

Every file (page/graphic ...) that is loaded is counted towards bandwidth, if a query is sent to a database, is the whole databases table content loaded?
if its a included file, say a really big array, and only one or two variables used, is the whole included file loaded?

I guess the answers for the above will also answer these:
is an included file counted towards total page size, for counting load time?
If a database is counted towards bandwidth, how do you size up its contents?

Since there is no such thing as a sily question Laughing out loud
If an image, or even a file is cached, it would be drawen first from the cache before reloaded from the server? so this wouldnt count towards bandwidth again would it?
Is a included files content cached? or even a databases?

and many more questions Laughing out loud

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

I can guess at some of this -- there is a difference between CPU usage and bandwidth, meaning while the database is accessed, it's not all sent to the user with each call, so the include would count in the bandwith, but not the access of the db.

Yes, cache first, then server, depending on page, server, ISP, and browser settings. Included files aren't cached, but servlets are, sort of, and decrease CPU usage.

How's that for starters! Come on people, put me in my place, tell me where I'm wrong. Smiling

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

Server-side languages (hence, DB queries) and the like, run on the server before output is created.

I guess it's just the output to the client that counts towards bandwidth.

Similarly, includes are executed within the server, and the consequent HTML code is sent back.

As for caching includes and DBs; once again, the included file/DB itself isn't necessarily returned to the client. Wink

I think some hosts charge for CPU (over)usage and slowing servers, so it's not always free. Laughing out loud

Busy's picture

He has: 6,151 posts

Joined: May 2001

So the contents, whether it be included or from database would count for server bandwidth but the end result (displayed page) wouldn't ?
so how would you work out load time for anything serverside related? It cant be put down to the servers machine as the client has to be considered as well

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

You've got it the other way round. Sticking out tongue

The content, whatever it is, wouldn't count to badnwidth. The end results (the HTML, not the PHP code etc) is sent back to the client which uses bandwidth. Wink
I think

I'm not sure about load time calculations. Sad

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.