Does Php Slow your site down?

Does Php Slow your site down?

Page 1 of 1

4 Replies - 2310 Views - Last Post: 27 May 2008 - 07:30 PM Rate Topic: -----

#1 ultimatenet  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 14-April 08

Does Php Slow your site down?

Posted 27 May 2008 - 11:43 AM

I posted a similar topic like this in google groups but got very little answers so that why im posting here.
Does php slow your site down.
The thing is that my site takes nearly 5-10 seconds to load and that would be pretty boring waiting 5-10 seconds for waiting for a site to load.
I use about 1000 lines of php on a page when a user is logged it and only 10% of that code is not php so what is it php or is it something else.

here is my site:http://www.ultimate-gamez.net

Is This A Good Question/Topic? 0
  • +

Replies To: Does Php Slow your site down?

#2 exception  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 25-May 08

Re: Does Php Slow your site down?

Posted 27 May 2008 - 12:16 PM

Hello ultimatenet,


I have worked with PHP for many years now. I came across the same problem as you a while back. I had to find a result. What i found is, PHP does not slow your pc down to an extent.
The main cause in slow loading sites are; where the site is hosted, how much data ( graphics are to be loaded and the size of the files) If i was you I would look into these.


exception.
Was This Post Helpful? 0
  • +
  • -

#3 JBrace1990  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 110
  • View blog
  • Posts: 760
  • Joined: 09-March 08

Re: Does Php Slow your site down?

Posted 27 May 2008 - 12:32 PM

I just looked at the site.... it loads quickly for me (but I have verizon FIOS, so everything goes fast...)

judging by it, the images took the longest to load (which is common), especially this one, which I would suggest making the file size smaller...

the PHP doesn't slow it down too much, as long as you don't have continuous loops in your PHP...
Was This Post Helpful? 0
  • +
  • -

#4 akozlik  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 90
  • View blog
  • Posts: 797
  • Joined: 25-February 08

Re: Does Php Slow your site down?

Posted 27 May 2008 - 07:15 PM

I'm currently maintaining a site that was built in PHP and runs slowly. The problem with the site is that it loads data from our database for about a hundred different individuals, and displays it with dhtml. All those calls to the database and php execution really takes a toll on the server, which leads to the slow down. You may be having the same issue with your site. The page that I went to loaded quickly, but you may want to keep this in mind while you're developing your game.

Hope that helps and let us know if you figure out some way to optimize.
Was This Post Helpful? 0
  • +
  • -

#5 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4334
  • View blog
  • Posts: 12,128
  • Joined: 18-April 07

Re: Does Php Slow your site down?

Posted 27 May 2008 - 07:30 PM

There are a number of things that can cause PHP, and a site in general, to run slow.

First of all, it depends on how PHP is installed. PHP can be installed as a CGI module or an ISAPI configuration. CGI is known to be a tad slower than the ISAPI setup.

Second, PHP is meant to be one of those languages where you sprinkle the code through the HTML, putting all lines of HTML whether or not it has PHP code can slow the rendering because PHP will process all the HTML even if it doesn't do anything.

Third, if you have any database connections or image manipulation routines these are obviously going to take the longest. To help with that you should keep database connections to a minimum and try to limit your queries as much as possible. This goes with pretty much any programming language.

Fourth, your coding could just be badly designed. Obviously if you are iterating through 1 million records and each iteration of a loop you are iterating another loop 10 times you are essentially processing 10 million iterations and that will take a bit of time in any language.

Lastly, it could also depend on the hardware and software you are running it on. PHP on a windows server machine will typically be a bit slower than a linux machine just due to windows eating up a lot of resources.

But overall PHP is typically faster than other server side languages just because of the streamlined code base and the code is interpreted rather than compiled like some of ASP is.

Now this is just PHP but a whole bunch of other things could slow the site down that is not related to PHP.

Hope that answers your question. :)

This post has been edited by Martyr2: 27 May 2008 - 07:32 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1