WTF-60k for php file transfer
- Started
- Last post
- 8 Responses
- morphinelips
Ths is a site I am developing:
It went through about 2 weeks of beta testing, and now I am wrapping up some more bug fixes before I launch it. But I have noticed an issue when I look at the stats. The php4 file in the long left hand iframe is showing up as being 60+ KB! This is single handedly ballooning up the bandwidth for the site, and as I am anticipating some reasonably heavy traffic, I think it's a concern.
The php file in question is about 29k as unprocessed php, but I would think the transfer would be even smaller than that since the html it produces can't be more than a few K. There is alot of processing and query calls going on in the file, but I would anticipate that killing my processor/RAM rather than my bandwidth.
Anyone have any ideas as to what is going on?
- canadian0
ok. what?
- morphinelips0
"The php4 file in the long left hand iframe is showing up as being 60+ KB!" I should have said that it is showing up as transfering at 60+ kb.
I was just talking to a friend and he asked how much database processing I was doing with the file, and it quite alot. He said that the transfer between the php file and the database might be counting as bandwidth transfer. Anyone know how I could correct that?
- canadian0
Yeah. What he said.
- morphinelips0
Can the traffic between the php file and my mysql server (both reside on the same machine) be made to not count as bandwidth traffic?
- canadian0
uh. yes?
- morphinelips0
wow, that was helpful. any ideas how?
- monNom0
write to a static HTML file on a regular basis (hourly?) so as not to run up the bandwidth expense for each hit.
something like this:
$htmlfile = "/www/iframe.htm";
$result = -yourOutput-;$htmlfp = fopen($htmlfile,"w+");
fputs($htmlfp,$result);
fclose($htmlfp);might work.
(copy and paste code... I dunno if it's valid)
- enobrev0
or you could try paginating your listing. The image you linked to is pretty small, so I have no idea what's being listed, but it looks like it may be a pretty long list.
Break it up but 20, 50, 100, etc (by user setting, so modem users could grab it at 20, broudband could set to all) and you should be all good.
