SitePoint Sponsor |
|
User Tag List
Results 1 to 12 of 12
Thread: Why is PHP so slow?
-
Feb 27, 2006, 15:41 #1
- Join Date
- Feb 2006
- Location
- Hamburg, Germany
- Posts
- 593
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Why is PHP so slow?
Hey there,
I only just got into PHP and uploaded my first site today (yay!).
Now here's my question: To me it seems like my pages take an awful lot longer to download than previously when I used to code all my pages in HTML only (!!!). Basically, there's only one server request per page, so I really wonder what's going to happen when I have several server requests in one page. Is there any way to speed PHP up? Someone told me there's a way to "pre-bake" (???) pages, so they become as fast as ordinary HTML files...? Is this true? If yes, how can I do it?
Greetz to all of you.
-
Feb 27, 2006, 15:42 #2
- Join Date
- Feb 2006
- Location
- Hamburg, Germany
- Posts
- 593
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Oh by the way, feel free to check out my site: http://www.timokleemann.com
-
Feb 27, 2006, 16:24 #3
Your site loaded in 0.828 seconds for me... What connection are you on?
The site in your sig loaded in 0.328 seconds also.
Btw - FasterFox extension for firefox told me this.Beware of Raj - My Portfolio and Blog.
-
Feb 27, 2006, 16:32 #4
- Join Date
- Sep 2002
- Location
- Lisbon
- Posts
- 1,393
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Loaded pretty fast to me. By the way, lovely design you have there.
-
Feb 27, 2006, 16:40 #5
- Join Date
- Feb 2006
- Location
- Hamburg, Germany
- Posts
- 593
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It's hosted in Germany, at an ISP called Strato.
HitRaj, can you do me a favour and also check the times for http://www.pixellover.net/index.htm ?
That would be cool. Else I have no reference values...
-
Feb 27, 2006, 16:46 #6
That site took 1.172 seconds.
I am on 10mb though...Beware of Raj - My Portfolio and Blog.
-
Feb 27, 2006, 16:53 #7
- Join Date
- Feb 2006
- Location
- Hamburg, Germany
- Posts
- 593
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
That IS extremely strange...! Because I have tested both sites on various machines, and PixelLover always seems much faster. Maybe I'm just biased...?!
Thanks a lot by the way.
-
Feb 27, 2006, 17:09 #8
- Join Date
- Dec 2005
- Location
- Cambridge, England
- Posts
- 2,443
- Mentioned
- 82 Post(s)
- Tagged
- 3 Thread(s)
If you have a lot of text on a page put the below at the top of your page as it can speed it up.
PHP Code:ob_start("ob_gzhandler");
Anthony
-
Feb 27, 2006, 23:58 #9
- Join Date
- Mar 2004
- Location
- Adelaide, Australia
- Posts
- 124
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by PixelLover
. If you're programming in HTML there's no PHP in the pipeline and so pages go straight from the server disk back to the user.
If your sites are taking an exorbitant amount of time to load (whatever you do, don't get pedantic. Users will tolerate a few extra tenth's of a second) then you most likely need to re-evaluate your code.
FWIW, both sites loaded quite quickly for me (and I'm on 128kbit). It could be network congestion in your area.
This space for rent.
-
Feb 28, 2006, 00:35 #10
- Join Date
- Nov 2004
- Location
- Ankh-Morpork
- Posts
- 12,158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by agoossens
Birnam wood is come to Dunsinane
-
Feb 28, 2006, 12:05 #11
- Join Date
- Feb 2006
- Location
- Hamburg, Germany
- Posts
- 593
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
But both sites, www.pixellover.net and www.timokleemann.com are hosted at the exact same company. And PixelLover feels an awful lot faster wherever I log on to the site (I normally use about 5 different computers every day).
Isn't there a way to ... let's say, "pre-compile" my PHP pages, so they load just as fast as static (HTML) pages? I'm sure this is possible, I've heard about it a couple of times. Any ideas?
-
Feb 28, 2006, 18:31 #12
- Join Date
- Mar 2004
- Location
- Adelaide, Australia
- Posts
- 124
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by AutisticCuckoo
Ironic too, since I get get quite irked when people say what I did.
Originally Posted by PixelLover
This space for rent.
Bookmarks