Re: [PHP] Performance / AB issue?

2012-05-15 Thread Lars Nielsen
> >> On Fri, May 11, 2012 at 9:53 AM, Camilo Sperberg >> wrote: >>> >>> >>> Sent from my iPhone 5 Beta [Confidential use only] >>> >>> On 11 mei 2012, at 07:09, "Lars Nielsen" wrote: >>> > > On 10 mei 2012, at 23:26, Lars Nielsen wrote: > >> >>> >>> >>> Sent from

Re: [PHP] Performance / AB issue?

2012-05-15 Thread Lars Nielsen
> On Fri, May 11, 2012 at 9:53 AM, Camilo Sperberg > wrote: >> >> >> Sent from my iPhone 5 Beta [Confidential use only] >> >> On 11 mei 2012, at 07:09, "Lars Nielsen" wrote: >> >>> On 10 mei 2012, at 23:26, Lars Nielsen wrote: > >> >> >> Sent from my iPhone 5 Beta

Re: [PHP] Performance / AB issue?

2012-05-11 Thread Lars Nielsen
> On Fri, May 11, 2012 at 9:53 AM, Camilo Sperberg > wrote: >> >> >> Sent from my iPhone 5 Beta [Confidential use only] >> >> On 11 mei 2012, at 07:09, "Lars Nielsen" wrote: >> >>> On 10 mei 2012, at 23:26, Lars Nielsen wrote: > >> >> >> Sent from my iPhone 5 Beta

Re: [PHP] Performance / AB issue?

2012-05-11 Thread Mike Mackintosh
How is PHP running, fast-cgi, sapi, etc..? Is there anything in the error_log for apache? Could be an issue with prefork/worker. Thanks, Mike Mackintosh PHP, the drug of choice - www.highonphp.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.

Re: [PHP] Performance / AB issue?

2012-05-11 Thread Matijn Woudt
On Fri, May 11, 2012 at 9:53 AM, Camilo Sperberg wrote: > > > Sent from my iPhone 5 Beta [Confidential use only] > > On 11 mei 2012, at 07:09, "Lars Nielsen" wrote: > >> >>> >>> On 10 mei 2012, at 23:26, Lars Nielsen wrote: >>> > > > Sent from my iPhone 5 Beta [Confidential use o

Re: [PHP] Performance / AB issue?

2012-05-11 Thread Camilo Sperberg
Sent from my iPhone 5 Beta [Confidential use only] On 11 mei 2012, at 07:09, "Lars Nielsen" wrote: > >> >> On 10 mei 2012, at 23:26, Lars Nielsen wrote: >> >>> Sent from my iPhone 5 Beta [Confidential use only] On 10 mei 2012, at 17:40, Matijn Woudt wrote:

Re: [PHP] Performance / AB issue?

2012-05-10 Thread Lars Nielsen
> > On 10 mei 2012, at 23:26, Lars Nielsen wrote: > >> >>> >>> >>> Sent from my iPhone 5 Beta [Confidential use only] >>> >>> On 10 mei 2012, at 17:40, Matijn Woudt wrote: >>> On Thu, May 10, 2012 at 9:04 AM, Lars Nielsen wrote: > Hi there, > > I have apache-2.22/php 5.3.10 set

Re: [PHP] Performance / AB issue?

2012-05-10 Thread Camilo Sperberg
On 10 mei 2012, at 23:26, Lars Nielsen wrote: > >> >> >> Sent from my iPhone 5 Beta [Confidential use only] >> >> On 10 mei 2012, at 17:40, Matijn Woudt wrote: >> >>> On Thu, May 10, 2012 at 9:04 AM, Lars Nielsen wrote: Hi there, I have apache-2.22/php 5.3.10 set up on a de

Re: [PHP] Performance / AB issue?

2012-05-10 Thread Matijn Woudt
On Thu, May 10, 2012 at 11:26 PM, Lars Nielsen wrote: > >> >> >> Sent from my iPhone 5 Beta [Confidential use only] >> >> On 10 mei 2012, at 17:40, Matijn Woudt wrote: >> >>> On Thu, May 10, 2012 at 9:04 AM, Lars Nielsen wrote: Hi there, I have apache-2.22/php 5.3.10 set up on a d

Re: [PHP] Performance / AB issue?

2012-05-10 Thread Lars Nielsen
> > > Sent from my iPhone 5 Beta [Confidential use only] > > On 10 mei 2012, at 17:40, Matijn Woudt wrote: > >> On Thu, May 10, 2012 at 9:04 AM, Lars Nielsen wrote: >>> Hi there, >>> >>> I have apache-2.22/php 5.3.10 set up on a dedicated server but I have a >>> strange issue. >>> >>> I have mad

Re: [PHP] Performance / AB issue?

2012-05-10 Thread Camilo Sperberg
Sent from my iPhone 5 Beta [Confidential use only] On 10 mei 2012, at 17:40, Matijn Woudt wrote: > On Thu, May 10, 2012 at 9:04 AM, Lars Nielsen wrote: >> Hi there, >> >> I have apache-2.22/php 5.3.10 set up on a dedicated server but I have a >> strange issue. >> >> I have made a Drupal 7 s

Re: [PHP] Performance / AB issue?

2012-05-10 Thread Matijn Woudt
On Thu, May 10, 2012 at 9:04 AM, Lars Nielsen wrote: > Hi there, > > I have apache-2.22/php 5.3.10 set up on a dedicated server but I have a > strange issue. > > I have made a Drupal 7 site with a mysql db. > > If I stress-test the site with : ab -c 1 -n 150 http://sitename/ it works > fine. > If

Re: [PHP] Performance gain when not using prepared statements?

2011-06-17 Thread Eric Butera
On Fri, Jun 17, 2011 at 4:55 AM, Vitalii Demianets wrote: > On Friday 17 June 2011 04:50:00 Daevid Vincent wrote: >> > I've seen too many people over the years try and rally against common >> > sense practices like using prepared statements for perhaps a marginal >> > gain of performance on one pa

Re: [PHP] Performance Improvement on Calling C++ executable from PHP

2010-12-20 Thread Daniel P. Brown
On Sun, Dec 19, 2010 at 15:35, Shiplu wrote: > === > Recently I  my this php-general doesn't accept my mail for some > reason. So I send it again from anther email >

Re: [PHP] Performance of while(true) loop

2009-09-10 Thread Jim Lucas
APseudoUtopia wrote: > Hey list, > > I have a php cli script that listens on a UDP socket and, when data is > sent to the socket, the script inserts it into a database. I'm using > the real BSD socket functions, not fsock. > > The script runs socket_create(), then socket_bind(). Then it starts a

Re: [PHP] Performance of while(true) loop

2009-09-09 Thread Ben Dunlap
I have a php cli script that listens on a UDP socket and, when data is [8<] >> So I think the the MSG_WAITALL is causing it to block until incoming >> data connection is closed (it never reaches the 512 byte mark before [8<] > your "clients" are not maintaining an open connection to the socket

Re: [PHP] Performance of while(true) loop

2009-09-09 Thread Eddie Drapkin
On Wed, Sep 9, 2009 at 10:53 PM, APseudoUtopia wrote: > On Wed, Sep 9, 2009 at 10:39 PM, Eddie Drapkin wrote: >> On Wed, Sep 9, 2009 at 10:32 PM, APseudoUtopia >> wrote: >>> Hey list, >>> >>> I have a php cli script that listens on a UDP socket and, when data is >>> sent to the socket, the scrip

Re: [PHP] Performance of while(true) loop

2009-09-09 Thread APseudoUtopia
On Wed, Sep 9, 2009 at 10:39 PM, Eddie Drapkin wrote: > On Wed, Sep 9, 2009 at 10:32 PM, APseudoUtopia > wrote: >> Hey list, >> >> I have a php cli script that listens on a UDP socket and, when data is >> sent to the socket, the script inserts it into a database. I'm using >> the real BSD socket

Re: [PHP] Performance of while(true) loop

2009-09-09 Thread Eddie Drapkin
On Wed, Sep 9, 2009 at 10:32 PM, APseudoUtopia wrote: > Hey list, > > I have a php cli script that listens on a UDP socket and, when data is > sent to the socket, the script inserts it into a database. I'm using > the real BSD socket functions, not fsock. > > The script runs socket_create(), then

[PHP] Re: PHP performance profiling

2008-11-18 Thread Nathan Rixham
Gryffyn wrote: I did a search and didn't find anything really astounding sounding, so I wanted to ask for some "live" recommendations from the crowd here. I was wondering if anyone had used FirePHP with Firebug or could recommend a good profiling method for figuring out where the slow parts of

RE: [PHP] & performance issues

2008-04-18 Thread Ford, Mike
On 17 April 2008 11:57, Bojan Tesanovic advised: > in PHP5 by default Objects are passed by reference Please stop repeating this -- erm -- inexactitude. In PHP5, objects are passed around by their handle, *not* as a reference. Most of the time, this has the same effect, as you are addressing the

Re: [PHP] & performance issues

2008-04-17 Thread Eric Butera
On Thu, Apr 17, 2008 at 7:10 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > On Thu, Apr 17, 2008 at 11:51 AM, Eric Butera <[EMAIL PROTECTED]> wrote: > > > > > > > > > On Thu, Apr 17, 2008 at 12:00 PM, Nathan Nobbe <[EMAIL PROTECTED]> > wrote: > > > On Thu, Apr 17, 2008 at 4:57 AM, Bojan Tesanovic <[

Re: [PHP] & performance issues

2008-04-17 Thread Nathan Nobbe
On Thu, Apr 17, 2008 at 11:51 AM, Eric Butera <[EMAIL PROTECTED]> wrote: > On Thu, Apr 17, 2008 at 12:00 PM, Nathan Nobbe <[EMAIL PROTECTED]> > wrote: > > On Thu, Apr 17, 2008 at 4:57 AM, Bojan Tesanovic <[EMAIL PROTECTED]> > > wrote: > > > > > > > in PHP5 by default Objects are passed by refere

Re: [PHP] & performance issues

2008-04-17 Thread Eric Butera
On Thu, Apr 17, 2008 at 12:00 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > On Thu, Apr 17, 2008 at 4:57 AM, Bojan Tesanovic <[EMAIL PROTECTED]> > wrote: > > > > in PHP5 by default Objects are passed by reference and as you can see at > > this graph passing array by reference in PHP5 is slower >

Re: [PHP] & performance issues

2008-04-17 Thread Nathan Nobbe
On Thu, Apr 17, 2008 at 4:57 AM, Bojan Tesanovic <[EMAIL PROTECTED]> wrote: > in PHP5 by default Objects are passed by reference and as you can see at > this graph passing array by reference in PHP5 is slower > http://nathan.moxune.com/arrayVsArrayIteratorReport.php wow, thats hilarious, thats m

Re: [PHP] & performance issues

2008-04-17 Thread Nathan Nobbe
On Thu, Apr 17, 2008 at 12:14 AM, Robert Cummings <[EMAIL PROTECTED]> wrote: > If it's faster, it's faster so that would suggest a performance gain... > but as many will tell you, and you most likely already know... is the > gain worth the effort? BTW, rote replacement of references like that, > m

Re: [PHP] & performance issues

2008-04-17 Thread Bojan Tesanovic
On Apr 17, 2008, at 5:37 AM, Nathan Nobbe wrote: all, i have heard from various sources that using the & in php can at times be costly, and therefore, it should not be used when it is not needed. for example, passing an array by reference because you think youre passing the actual array

Re: [PHP] & performance issues

2008-04-16 Thread Robert Cummings
On Wed, 2008-04-16 at 23:37 -0400, Nathan Nobbe wrote: > all, > > i have heard from various sources that using the & in php can at times be > costly, and therefore, it should not be used when it is not needed. for > example, passing an array by reference because you think youre passing the > act

Re: [PHP] Performance Problem

2008-02-27 Thread Daniel Brown
On Wed, Feb 27, 2008 at 4:29 PM, Adriano Manocchia <[EMAIL PROTECTED]> wrote: > Whoa. No need to get snippy. I was being sincere in my gratitude for > the suggestions. If nothing else, I'm sure I'll be making more use of > Xdebug in the future. I'm not being snippy at all. I was admitting m

Re: [PHP] Performance Problem

2008-02-27 Thread Ray Hauge
Adriano Manocchia wrote: Whoa. No need to get snippy. I was being sincere in my gratitude for the suggestions. If nothing else, I'm sure I'll be making more use of Xdebug in the future. On Feb 27, 2008, at 3:55 PM, Shawn McKenzie wrote: Adriano Manocchia wrote: Well, I just spent more time

Re: [PHP] Performance Problem

2008-02-27 Thread Shawn McKenzie
Doh, sorry... I was jokingly replying to: "I was going to suggest that it was most likely an Apache or DNS issue as opposed to PHP, but after I realized I missed that your "php tests were run on a single-line PHP script that simply echoed 'hi' so it couldn't get much simpler than that," I figured

Re: [PHP] Performance Problem

2008-02-27 Thread Adriano Manocchia
Whoa. No need to get snippy. I was being sincere in my gratitude for the suggestions. If nothing else, I'm sure I'll be making more use of Xdebug in the future. On Feb 27, 2008, at 3:55 PM, Shawn McKenzie wrote: Adriano Manocchia wrote: Well, I just spent more time messing with httpd's con

Re: [PHP] Performance Problem

2008-02-27 Thread Shawn McKenzie
Adriano Manocchia wrote: > Well, I just spent more time messing with httpd's conf and it the > problem seems to have resolved itself by turning off hostname lookups. I > know there's overhead associated with it, but I don't really understand > why it only affected PHP, and so drastically. At any ra

Re: [PHP] Performance Problem

2008-02-27 Thread Daniel Brown
On Wed, Feb 27, 2008 at 2:50 PM, Adriano Manocchia <[EMAIL PROTECTED]> wrote: > Well, I just spent more time messing with httpd's conf and it the > problem seems to have resolved itself by turning off hostname lookups. > I know there's overhead associated with it, but I don't really > understand

Re: [PHP] Performance Problem

2008-02-27 Thread Eric Butera
On Wed, Feb 27, 2008 at 2:34 PM, Adriano Manocchia <[EMAIL PROTECTED]> wrote: > OK. I just went through about 10 minutes' worth of cachegrinds, > including several httperf tests on that empty php file (which had the > usual poor results). According to the cachegrind files, nothing > (including t

Re: [PHP] Performance Problem

2008-02-27 Thread Adriano Manocchia
Well, I just spent more time messing with httpd's conf and it the problem seems to have resolved itself by turning off hostname lookups. I know there's overhead associated with it, but I don't really understand why it only affected PHP, and so drastically. At any rate, I guess this issue is

Re: [PHP] Performance Problem

2008-02-27 Thread Adriano Manocchia
OK. I just went through about 10 minutes' worth of cachegrinds, including several httperf tests on that empty php file (which had the usual poor results). According to the cachegrind files, nothing (including the other active web pages) took more than 15ms and the empty php file never excee

Re: [PHP] Performance Problem

2008-02-27 Thread Adriano Manocchia
I'm trying to get it working but it doesn't seem to want to write the profile info at the moment. Correct me if I'm wrong, but wouldn't this just show problems within actual code? If the problem is occurring on a PHP file with no PHP in it whatsoever, it seems to fall outside the scope of w

Re: [PHP] Performance Problem

2008-02-27 Thread Eric Butera
On Wed, Feb 27, 2008 at 12:39 PM, Adriano Manocchia <[EMAIL PROTECTED]> wrote: > Hi all, > > I've been chasing what I think is the same performance issue for about > a year and it's driving me batty. First off, the server is a dual core > 2.8 P4 with 2G RAM running RHEL5 hosted at The Planet and

Re: [PHP] Performance Problem

2008-02-27 Thread Adriano Manocchia
I know my original post was long-winded, but I did mention that my php tests were run on a single-line PHP script that simply echoed "hi" so it couldn't get much simpler than that. But for thoroughness' sake, I've run the tests against a test file with a php extension with no PHP code at al

Re: [PHP] Performance Problem

2008-02-27 Thread Daniel Brown
On Wed, Feb 27, 2008 at 12:39 PM, Adriano Manocchia <[EMAIL PROTECTED]> wrote: > Hi all, > > I've been chasing what I think is the same performance issue for about > a year and it's driving me batty. First off, the server is a dual core > 2.8 P4 with 2G RAM running RHEL5 hosted at The Planet and

Re: [PHP] performance/load testing ...

2008-01-22 Thread Richard Lynch
apache benchmark, aka "ab" comes with apache and lets you hit your server as many times as you want. Also see wget and valgrind/callgrind For Windows users, there's something called SuperSmack or some equally silly name... :-) On Mon, January 21, 2008 3:50 am, Jochem Maas wrote: > hi guys, > > I

Re: [PHP] performance/load testing ...

2008-01-21 Thread Eric Butera
On Jan 21, 2008 5:50 AM, Jochem Maas <[EMAIL PROTECTED]> wrote: > Ron Rademaker schreef: > > Jochem Maas wrote: > >> Ron Rademaker schreef: > >>> Hi Jochem, > >>> > >>> Apache comes with an nice ab tool which stands for apache > >>> benchmarking. You can use this to benchmark stuff like concurrent

Re: [PHP] performance/load testing ...

2008-01-21 Thread Jochem Maas
Ron Rademaker schreef: Jochem Maas wrote: Ron Rademaker schreef: Hi Jochem, Apache comes with an nice ab tool which stands for apache benchmarking. You can use this to benchmark stuff like concurrent requests. indeed, I know ab, but it doesn't allow for a very realistic request 'spread'

Re: [PHP] performance/load testing ...

2008-01-21 Thread Ron Rademaker
Jochem Maas wrote: Ron Rademaker schreef: Hi Jochem, Apache comes with an nice ab tool which stands for apache benchmarking. You can use this to benchmark stuff like concurrent requests. indeed, I know ab, but it doesn't allow for a very realistic request 'spread' - at least as far as I k

Re: [PHP] performance/load testing ...

2008-01-21 Thread Jochem Maas
Ron Rademaker schreef: Hi Jochem, Apache comes with an nice ab tool which stands for apache benchmarking. You can use this to benchmark stuff like concurrent requests. indeed, I know ab, but it doesn't allow for a very realistic request 'spread' - at least as far as I know. I was hoping for

Re: [PHP] performance/load testing ...

2008-01-21 Thread Paul Scott
On Mon, 2008-01-21 at 10:50 +0100, Jochem Maas wrote: > Does anyone have any tips, urls, advice as to how to start > going about creating something like a 'test suite' for testing > high load performance of a website? > I went through a similar headache recently, and looked at a whole whack of t

Re: [PHP] Performance question for table updating

2007-11-27 Thread Andrew Ballard
On Nov 24, 2007 2:32 AM, Jon Westcot <[EMAIL PROTECTED]> wrote: > Hi all: > > For those who've been following the saga, I'm working on an application > that needs to load > a data file consisting of approximately 29,000 to 35,000 records in it (and > not short ones, > either) into several tab

Re: [PHP] Performance question for table updating

2007-11-25 Thread Chris
Eventually, I wind up with a query similar to: UPDATE table_01 SET field_a = 'New value here', updated=CURDATE() WHERE primary_key=12345 Even though you've solved it one way to work out the problem here would be to change it to a select query (unfortunately mysql can't explain

Re: [PHP] Performance question for table updating (SOLVED)

2007-11-24 Thread Robert Cummings
On Sat, 2007-11-24 at 04:03 -0700, Jon Westcot wrote: > > Moral of the story? Two, really. First, ensure you always reference > values in the way most appropriate for their type. Second, don't make your > idiocy public by asking stupid questions on a public forum. What's the > quote (prob

RE: [PHP] Performance question for table updating (SOLVED)

2007-11-24 Thread Bastien Koert
Could there be some performance gain by uploading the data to another table and then update / insert via sql? bastien > From: [EMAIL PROTECTED] > To: php-general@lists.php.net > Date: Sat, 24 Nov 2007 04:03:53 -0700 > Subject: Re: [PHP]

Re: [PHP] Performance question for table updating (SOLVED)

2007-11-24 Thread Jon Westcot
Hi Rob, et al.: - Original Message - From: "Andrés Robinet" <[EMAIL PROTECTED]> > > -Original Message- > > From: Jon Westcot [mailto:[EMAIL PROTECTED] > > > > :: gigantic snip here:: > > > > So, long story short (oops -- too late!), what's the concensus > > among the learned as

RE: [PHP] Performance question for table updating

2007-11-24 Thread Andrés Robinet
> -Original Message- > From: Jon Westcot [mailto:[EMAIL PROTECTED] > Sent: Saturday, November 24, 2007 4:32 AM > To: PHP General > Subject: [PHP] Performance question for table updating > > Hi all: > > For those who've been following the saga, I'm working on an > application that need

Re: [PHP] Performance of PHP

2007-11-06 Thread Per Jessen
Merlin wrote: > Hi there, > > I am doing some image cropping of about 40.000 files with php. If you're worried about performance, maybe why not use mogrify from ImageMagick? /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.

Re: [PHP] Performance of PHP

2007-11-06 Thread Sudheer Satyanarayana
Merlin wrote: Hi there, I am doing some image cropping of about 40.000 files with php. To do this I wrote a PHP file that does what I want and I did disable the timeout so I can call it via webbrowser and fire the script. There are two down sides I see: 1. One image takes about 0.25 s, so the w

Re: [PHP] Re: PHP Performance and System Load

2007-07-20 Thread Sancar Saran
Hi, I had lots of loop in my code. My gain was %4 to %6 and I say "may gain another %10". Of course your millage was different than me Regards Sancar On Saturday 21 July 2007 01:03:45 Richard Lynch wrote: > On Fri, July 20, 2007 4:16 am, Colin Guthrie wrote: > > Sancar Saran wrote: > >> Anoth

Re: [PHP] Re: PHP Performance and System Load

2007-07-20 Thread Richard Lynch
On Fri, July 20, 2007 4:16 am, Colin Guthrie wrote: > Sancar Saran wrote: >> Another simple performance tip. >> >> Most of for examples of php look like this >> for($x=0;$x> >> This is bad. In every cycle you call sizeof >> >> this was good >> $intSize = sizeof($arrSometing); >> for($x=0;$x<$intSiz

[PHP] Re: PHP Performance and System Load

2007-07-20 Thread Colin Guthrie
Sancar Saran wrote: > Another simple performance tip. > > Most of for examples of php look like this > for($x=0;$x > This is bad. In every cycle you call sizeof > > this was good > $intSize = sizeof($arrSometing); > for($x=0;$x<$intSize;$x++) > > if u use. > for($x=0;$x<$intSiz;++$x). You may g

Re: [PHP] performance down

2007-04-24 Thread Jochem Maas
Tijnema ! wrote: > On 4/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> Hello everyone, >> >> recently we tested upgrading our systems from: >>apache 2.0.55 >>php 5.1.6 >>eacclerator 0.9.5 >> to: >>apache 2.2.3 >>php 5.2.0 >>eaccelerator 0.9.5

Re: [PHP] performance down

2007-04-24 Thread Tijnema !
On 4/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hello everyone, recently we tested upgrading our systems from: apache 2.0.55 php 5.1.6 eacclerator 0.9.5 to: apache 2.2.3 php 5.2.0 eaccelerator 0.9.5 but we always get worse performance than befo

Re: [PHP] Performance: While or For loop

2007-03-27 Thread Tijnema !
On 3/27/07, Travis Doherty <[EMAIL PROTECTED]> wrote: Jake Gardner wrote: > He said if you run the /script/ itself 1000 times, not a loop with 1000 > iterations. This is quite possible; I am fairly certain there are > websites > out there that get accessed well over 1000 times a minute, yes? > >

Re: [PHP] Performance: While or For loop

2007-03-26 Thread Travis Doherty
Jake Gardner wrote: > He said if you run the /script/ itself 1000 times, not a loop with 1000 > iterations. This is quite possible; I am fairly certain there are > websites > out there that get accessed well over 1000 times a minute, yes? > > So every minute, that website is saving a total of 2.6

Re: [PHP] Performance: While or For loop

2007-03-26 Thread Jake Gardner
He said if you run the /script/ itself 1000 times, not a loop with 1000 iterations. This is quite possible; I am fairly certain there are websites out there that get accessed well over 1000 times a minute, yes? So every minute, that website is saving a total of 2.6 seconds to do... whatever it is

Re: [PHP] Performance: While or For loop

2007-03-26 Thread Richard Lynch
On Sat, March 24, 2007 4:52 am, Tijnema ! wrote: >> That means that at 1000 iterations, you are "saving" how much time? >> >> .00026 seconds? >> .4 seconds? >> >> Puhleaze. > > Well, if you execute this script 1000 times, you would get a > difference of 2.6 seconds? > But if every microseconds

Re: [PHP] Performance: While or For loop

2007-03-24 Thread Robert Cummings
On Sat, 2007-03-24 at 14:38 -0400, tedd wrote: > At 2:24 PM -0400 3/24/07, Robert Cummings wrote: > >On Sat, 2007-03-24 at 10:21 -0400, tedd wrote: > >> At 7:47 PM -0500 3/23/07, Richard Lynch wrote: > >> >Folks: > >> > > >> >How often do you use a loop of any kind in PHP with enough iterations

Re: [PHP] Performance: While or For loop

2007-03-24 Thread tedd
At 2:24 PM -0400 3/24/07, Robert Cummings wrote: On Sat, 2007-03-24 at 10:21 -0400, tedd wrote: At 7:47 PM -0500 3/23/07, Richard Lynch wrote: >Folks: > >How often do you use a loop of any kind in PHP with enough iterations >that this is even significant? > >Write the code that makes sens

Re: [PHP] Performance: While or For loop

2007-03-24 Thread Robert Cummings
On Sat, 2007-03-24 at 10:21 -0400, tedd wrote: > At 7:47 PM -0500 3/23/07, Richard Lynch wrote: > >Folks: > > > >How often do you use a loop of any kind in PHP with enough iterations > >that this is even significant? > > > >Write the code that makes sense. > > > >Optimize the biggest bottleneck unt

Re: [PHP] Performance: While or For loop

2007-03-24 Thread tedd
At 7:47 PM -0500 3/23/07, Richard Lynch wrote: Folks: How often do you use a loop of any kind in PHP with enough iterations that this is even significant? Write the code that makes sense. Optimize the biggest bottleneck until performance is acceptable. Absolutely -- the time we take discussi

Re: [PHP] Performance: While or For loop

2007-03-24 Thread Sancar Saran
Hi, I'm using so much FOR loops in my code, after seeing discussion I try to test. My findigs it was giving %2 to %10 percent performance boost. So ? My recent template addon to this code cost me around %5 to %10 percent of total page process.. I think It was nice trade off. Thank you guys.

Re: [PHP] Performance: While or For loop

2007-03-24 Thread Tijnema !
On 3/24/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Fri, March 23, 2007 7:54 pm, Tijnema ! wrote: > On 3/24/07, Richard Lynch <[EMAIL PROTECTED]> wrote: >> Folks: >> >> How often do you use a loop of any kind in PHP with enough >> iterations >> that this is even significant? >> >> Write the c

Re: [PHP] Performance: While or For loop

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 7:54 pm, Tijnema ! wrote: > On 3/24/07, Richard Lynch <[EMAIL PROTECTED]> wrote: >> Folks: >> >> How often do you use a loop of any kind in PHP with enough >> iterations >> that this is even significant? >> >> Write the code that makes sense. >> >> Optimize the biggest bottle

Re: [PHP] Performance: While or For loop

2007-03-23 Thread Robert Cummings
On Sat, 2007-03-24 at 01:54 +0100, Tijnema ! wrote: > On 3/24/07, Richard Lynch <[EMAIL PROTECTED]> wrote: > > On Thu, March 22, 2007 5:14 pm, Tijnema ! wrote: > > > On 3/22/07, Jon Anderson <[EMAIL PROTECTED]> wrote: > > >> Your test isn't exactly fair. The for loop has no statements in it, > > >>

Re: [PHP] Performance: While or For loop

2007-03-23 Thread Tijnema !
On 3/24/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Thu, March 22, 2007 5:14 pm, Tijnema ! wrote: > On 3/22/07, Jon Anderson <[EMAIL PROTECTED]> wrote: >> Your test isn't exactly fair. The for loop has no statements in it, >> and >> the while loop has one. Your tests show while as approx 7% f

Re: [PHP] Performance: While or For loop

2007-03-23 Thread Richard Lynch
On Thu, March 22, 2007 5:14 pm, Tijnema ! wrote: > On 3/22/07, Jon Anderson <[EMAIL PROTECTED]> wrote: >> Your test isn't exactly fair. The for loop has no statements in it, >> and >> the while loop has one. Your tests show while as approx 7% faster, >> while >> a modified test shows an approximate

Re: [PHP] Performance: While or For loop

2007-03-23 Thread Tijnema !
On 3/23/07, Mario Guenterberg <[EMAIL PROTECTED]> wrote: On Fri, Mar 23, 2007 at 12:24:45AM -0500, Travis Doherty wrote: > After multiple runs I see that the for pre-increment loop is fastest. > Note that the while loop with a post-increment runs once more than with > a pre-increment. > > Everyti

Re: [PHP] Performance: While or For loop

2007-03-22 Thread Mario Guenterberg
On Fri, Mar 23, 2007 at 12:24:45AM -0500, Travis Doherty wrote: > After multiple runs I see that the for pre-increment loop is fastest. > Note that the while loop with a post-increment runs once more than with > a pre-increment. > > Everytime I run, the results are *very* different, though still

Re: [PHP] Performance: While or For loop

2007-03-22 Thread Travis Doherty
Tijnema ! wrote: > On 3/22/07, Jon Anderson <[EMAIL PROTECTED]> wrote: > >> Your test isn't exactly fair. The for loop has no statements in it, and >> the while loop has one. Your tests show while as approx 7% faster, while >> a modified test shows an approximate 30% speed improvement: >> >> Do th

Re: [PHP] Performance: While or For loop

2007-03-22 Thread Tijnema !
On 3/22/07, Jon Anderson <[EMAIL PROTECTED]> wrote: Your test isn't exactly fair. The for loop has no statements in it, and the while loop has one. Your tests show while as approx 7% faster, while a modified test shows an approximate 30% speed improvement: Do this: for ($i=0;$i<1000;$i++) {

Re: [PHP] Performance: While or For loop

2007-03-22 Thread Tijnema !
On 3/22/07, Jake McHenry <[EMAIL PROTECTED]> wrote: does this help? http://www.php.lt/benchmark/phpbench.php Jake Well, there wasn't a test between For and While, so i did it myself, and i'm quite confused about the result. I let PHP count from 0 to 1 on my 1ghz AMD Athlon. While did

RE: [PHP] Performance: While or For loop

2007-03-22 Thread Jake McHenry
does this help? http://www.php.lt/benchmark/phpbench.php Jake > -Original Message- > From: Tijnema ! [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 22, 2007 4:38 PM > To: PHP > Subject: [PHP] Performance: While or For loop > > Hi, > > Does somebody has benchmarks of what is fast

Re: [PHP] performance criteria on DEFINE()

2006-04-22 Thread tedd
At 3:47 PM -0500 4/21/06, Richard Lynch wrote: On Fri, April 21, 2006 7:52 am, Jochem Maas wrote: Andy wrote: Now, one of this file can contain more than 2000 defines and we make a calculation that we will reach 8000 in 2 years. Seems to me you could extend your testing to generate 8000 co

Re: [PHP] performance criteria on DEFINE()

2006-04-21 Thread Richard Lynch
On Fri, April 21, 2006 7:52 am, Jochem Maas wrote: > Andy wrote: >> Now, one of this file can contain more than 2000 defines and we make >> a calculation that we will reach 8000 in 2 years. Seems to me you could extend your testing to generate 8000 constants in a file pretty easily, and just bench

Re: [PHP] performance criteria on DEFINE()

2006-04-21 Thread Andy
ent: Friday, April 21, 2006 3:52 PM Subject: Re: [PHP] performance criteria on DEFINE() Andy wrote: Hi, We have a big multilanguage project. For a while we used gettext to translate the pages, but we gave up on this because of many problems. Out solution is to create a file for each lan

Re: [PHP] performance criteria on DEFINE()

2006-04-21 Thread Jochem Maas
Andy wrote: Hi, We have a big multilanguage project. For a while we used gettext to translate the pages, but we gave up on this because of many problems. Out solution is to create a file for each language which includes the "label" definitions. for ex: define("LABEL1", "label 1"); define(

Re: [PHP] Performance question

2006-02-01 Thread Chris
Hi, Any time you fetch results from a database it take up memory, you can't do much about that (you can limit the effect by using 'limit' in conjunction with paging and only getting the columns you need etc but that's about it). If you're using a standard id/parentid type approach you're st

Re: [PHP] Performance question

2006-02-01 Thread Mathieu Dumoulin
Miles Thompson wrote: At 12:02 PM 2/1/2006, Mathieu Dumoulin wrote: This is more a "How would you do it" than a "How can i do it" question. Didn't have time to try it, but i want to know how mysql_seek_row acts with large result sets. For example im thinking of building a node tree applicat

Re: [PHP] Performance question

2006-02-01 Thread Miles Thompson
At 12:02 PM 2/1/2006, Mathieu Dumoulin wrote: This is more a "How would you do it" than a "How can i do it" question. Didn't have time to try it, but i want to know how mysql_seek_row acts with large result sets. For example im thinking of building a node tree application that can have dual

Re: [PHP] Performance question

2006-02-01 Thread tedd
This is more a "How would you do it" than a "How can i do it" question. Didn't have time to try it, but i want to know how mysql_seek_row acts with large result sets. For example im thinking of building a node tree application that can have dual direction links to nodes attached to different

Re: [PHP] Performance question

2006-02-01 Thread Mathieu Dumoulin
B trees or binary trees or hash tables or wathever sort algo or memory organisation could be just great if i'd put all my data in the page and tried or needed to sort it, but i can't do that and don't really need to. I'm actually searching for a way to load a ton of data from mysql but avoidin

Re: [PHP] Performance question

2006-02-01 Thread Jochem Maas
I think this might interest you: http://www.bluerwhite.org/btree/ then again it may make your ears bleed (because of the Maths :-). Mathieu Dumoulin wrote: This is more a "How would you do it" than a "How can i do it" question. Didn't have time to try it, but i want to know how mysql_seek_row

Re: [PHP] Performance & Comments Question

2006-01-19 Thread Jochem Maas
Rodolfo Andrade wrote: Hi all! I would like to know if comments in the code affects the performance. I know that comments are ignored by the interpreter, but it does increase the file size, so I was thinking about a possible performance hit for highly commented files. given the fact that you a

Re: [PHP] performance suggestions

2005-11-13 Thread Joe Belmaati
$sql = "SELECT u.*, s.*, p.* FROM URL u, session s, page p WHERE u.url_id = s.url_id AND s.section_id = p.section"; if (!$result = mysql_query($sql)) { die('Could not obtain results'); } while ($row = mysql_fetch_array($result)) { $url = $row['url_name']; .. .. and what ever e

Re: [PHP] performance suggestions

2005-11-08 Thread James Benson
Thanks Richard Lynch wrote: On Thu, November 3, 2005 8:29 am, James Benson wrote: Dear group, can someone suggest the best way to do the following without writing some lengthy script that (possibly) could lead to performance issues, I have three DB fields in MySQL, each has a unique ID, I

Re: [PHP] performance suggestions

2005-11-08 Thread Richard Lynch
On Thu, November 3, 2005 8:29 am, James Benson wrote: > Dear group, can someone suggest the best way to do the following > without > writing some lengthy script that (possibly) could lead to performance > issues, > > > I have three DB fields in MySQL, each has a unique ID, I cannot think > of > any

Re: [PHP] Performance of magic_quotes_gpc ??

2004-12-20 Thread Richard Lynch
Michael Gale wrote: > I am working on a ticket tracking system and using htmlentities and > htmlspecialchars on text that gets inserted into the database. > > code I have: > > --snip-- > if ((isset($_POST['tentry_body'])) AND strlen($_POST['tentry_body']) > 5) > { > $query .= " tentry_body =

Re: [PHP] Performance of magic_quotes_gpc ??

2004-12-19 Thread Michael Gale
Hello, Thanks for all of the responses ... I am going to use mysql_real_escape_string. Michael. Jordi Canals wrote: Hi, a couple of comments: --snip-- htmlentities(htmlspecialchars($_POST['tentry_body'])) . "'"; --snip-- Why are you using both htmlentities and htmlspecialchars? Think that htm

Re: [PHP] Performance of magic_quotes_gpc ??

2004-12-19 Thread Jordi Canals
Hi, a couple of comments: > --snip-- > htmlentities(htmlspecialchars($_POST['tentry_body'])) . "'"; > --snip-- Why are you using both htmlentities and htmlspecialchars? Think that html only converts some entities while htmlentities converts all ... so, for your purposes, apliying only one could

Re: [PHP] Performance of magic_quotes_gpc ??

2004-12-19 Thread Robert Cummings
On Sun, 2004-12-19 at 18:31, Michael Gale wrote: > Hello, > > I am working on a ticket tracking system and using htmlentities and > htmlspecialchars on text that gets inserted into the database. > > code I have: > > --snip-- > if ((isset($_POST['tentry_body'])) AND strlen($_POST['tentry_b

Re: [PHP] performance: large includes vs small includes with lots of reads

2004-10-07 Thread Curt Zirzow
* Thus wrote Hans H. Anderson: > I'm trying to tweak my server a bit and wonder if it is better to have a large > include file, say 20-40 kb with 15 user-defined functions, of which maybe 3 or 4 This is all a 'depends' situation. Of those 15 functions how many of them are actually executed accross

Re: [PHP] performance: large includes vs small includes with lots of reads

2004-10-07 Thread Greg Donald
On Thu, 7 Oct 2004 11:41:10 -0500 (CDT), Hans H. Anderson <[EMAIL PROTECTED]> wrote: > I'm trying to tweak my server a bit and wonder if it is better to have a large > include file, say 20-40 kb with 15 user-defined functions, of which maybe 3 or 4 > are used on any given page, or to have each func

  1   2   >