Forum Moderators: coopster

Message Too Old, No Replies

php pull performance

         

scorpion

3:04 am on Apr 21, 2003 (gmt 0)

10+ Year Member



If you pull a remote page 2k at a time using fread and then echo it should it load slower than the original page or the same speed? What if you have to place a base href tag to translate all relative urls to the correct base?

Thanks.

jatar_k

5:22 pm on Apr 21, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



to be honest, I have never tested it.

Have you tried benchmarking it scorpion?

scorpion

5:38 pm on Apr 21, 2003 (gmt 0)

10+ Year Member



yeah, but there are too many variables. Every refresh of a page could have a variability from my own computer... However, one one try, the original loaded 65s (it's a large page) and the php pull loaded at 80s, but I think its meaningless, so I'm thinking if there is a theory why php str_replace functions or placing a base href tag would slow down or speed up the load time...

jatar_k

5:52 pm on Apr 21, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



The page you have will always be slower than the original I would think. Given that you need to process the page after the other server has served it up. You would always be starting at the original time + whatever you need to do.

80s is a heck of a long time. Parsing a whole page and then reserving it is a pain and can be very time consuming depending on how much you need to replace. I have used the old trial and error method when doing large parsing jobs like that.

Benchmark, cringe, adjust or test different functions, benchmark, cringe, repeat.

Not the most scientific method maybe but shaving 1s off is always critical and then just whittle it down to the best you can get.