[PHP] Making PHP faster?

2002-08-12 Thread Jean-Christian Imbeault

I'm using PHP to load data into a PostgresQL database. The script works 
fine but it is a bit slow. It's taking about 30 minutes to load about 
15,000 items. This is mainly because of all the error checking and many 
redundant queries I am running.

This program is a one-off thing.

Are there any simple ways for me to make PHP run faster? I'm already 
using persistent DB connections. I was thinking along the lines 
increasing it's memory usage, turning off error checking, getting it to 
optimize the code on the fly, etc ...?

Thanks!

Jc


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Making PHP faster?

2002-08-12 Thread Andrew Brampton

I don't know any good ways of making PHP go faster, but may I suggest that
the time you use in coding and figuring out ways to make PHP faster would be
greater than the time you have saved by using such features...

If this is a one of thing I think 30minutes is better than 15minutes plus
60minutes of code changes/tweaks..

Just my 2c
Andrew
- Original Message -
From: Jean-Christian Imbeault [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 13, 2002 4:39 AM
Subject: [PHP] Making PHP faster?


 I'm using PHP to load data into a PostgresQL database. The script works
 fine but it is a bit slow. It's taking about 30 minutes to load about
 15,000 items. This is mainly because of all the error checking and many
 redundant queries I am running.

 This program is a one-off thing.

 Are there any simple ways for me to make PHP run faster? I'm already
 using persistent DB connections. I was thinking along the lines
 increasing it's memory usage, turning off error checking, getting it to
 optimize the code on the fly, etc ...?

 Thanks!

 Jc


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Making PHP faster?

2002-08-12 Thread Jean-Christian Imbeault

Andrew Brampton wrote:



 I don't know any good ways of making PHP go faster, but may I suggest that
 the time you use in coding and figuring out ways to make PHP faster would be
 greater than the time you have saved by using such features...


I am not looking to tweak my code. I am asking for ways to tell PHP when 
it is running to use as much memory as it wants, to hog the CPU if it 
wants, and if there is such a thing to compile itself with speed 
optimization in mind instead of optimizing for code size.

Jc


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Making PHP faster?

2002-08-12 Thread @ Edwin
Andrew,

It's true that "the time you use in coding and figuring out ways to make 
PHP faster would be greater than..."

The task mentioned might be a "one-off thing" NOW. However, the techniques 
that we can learn can also be applied in future task, so, I'm still 
interested in the answer to the original question...

- E


I don't know any good ways of making PHP go faster, but may I suggest that
the time you use in coding and figuring out ways to make PHP faster would 
be
greater than the time you have saved by using such features...

If this is a one of thing I think 30minutes is better than 15minutes plus
60minutes of code changes/tweaks..

Just my 2c
Andrew
- Original Message -
From: "Jean-Christian Imbeault" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 13, 2002 4:39 AM
Subject: [PHP] Making PHP faster?


  I'm using PHP to load data into a PostgresQL database. The script works
  fine but it is a bit slow. It's taking about 30 minutes to load about
  15,000 items. This is mainly because of all the error checking and many
  redundant queries I am running.
 
  This program is a one-off thing.
 
  Are there any simple ways for me to make PHP run faster? I'm already
  using persistent DB connections. I was thinking along the lines
  increasing it's memory usage, turning off error checking, getting it to
  optimize the code on the fly, etc ...?
 
  Thanks!
 
  Jc
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




_
$B:G?7$N%U%!%$%J%s%9>pJs$H%i%$%U%W%i%s$N%"%I%P%$%9(B MSN $B%^%M!<(B 
http://money.msn.co.jp/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Making PHP faster?

2002-08-12 Thread Mirek Novak

HI,
   I thing, you have to find out WHAT is really slow part, I don't think it is PHP 
what's slow, as you didn't write more about 
your project, try to find out the bottleneck in few steps, for example turn off 
error-checking, then put it back on  and turn 
off execution of INSERT queries, then switch back and turn off SELECT queries  
till u find out :). May be in Zend Studio, 
there is profiler, so you can try it out, or you can add some timers in your code to 
find out where your machine spends time, 
there are many ways. You may find out that you have to optimize your db queries or 
database model. As I don't know, and don't want 
to know :), details, I can give you only very common advices.
Hint, if you are doing redundant queries, don't do that! Do it only once, store result 
in an array and next time use it, its much 
more faster than asking db!

cheers

Jean-Christian Imbeault wrote:
 I'm using PHP to load data into a PostgresQL database. The script works 
 fine but it is a bit slow. It's taking about 30 minutes to load about 
 15,000 items. This is mainly because of all the error checking and many 
 redundant queries I am running.
 
 This program is a one-off thing.
 
 Are there any simple ways for me to make PHP run faster? I'm already 
 using persistent DB connections. I was thinking along the lines 
 increasing it's memory usage, turning off error checking, getting it to 
 optimize the code on the fly, etc ...?
 
 Thanks!
 
 Jc
 
 


-- 
--
Mirek Novak
Anima Publishers
CMS development

http://www.auto.cz
http://www.formule1.cz

jabber:[EMAIL PROTECTED]
ISEEKYOU:1one9four9nine44eight
GEsEm:+420603807838


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Making PHP faster?

2002-08-12 Thread Jean-Christian Imbeault

Mirek Novak wrote:



   I thing, you have to find out WHAT is really slow part, I don't think 
 it is PHP what's slow,


Thanks. Maybe I didn't write my question properly ...

I am not interested in making my program more efficient

I just want to set the proper PHP environment variable that will let PHP 
run as fast as it can. What are those variables? Variables that let PHP 
use more memory, use more CPU, compile more efficient code.

I am using PHP as a programming language and not as a script language to 
generate HTML for web pages. There must be some PHP options I can turn 
off that will let PHP run a bit fater no?

Jc


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php