Re: [PHP] Re: oop too slow

2004-08-19 Thread Yann Larrivee
You could simply recall the constructor if the object exist. This way you do not create the objects for every data entry you have and aviously it will use less ressources. Also like someone else told you, Get a Debuger! It will point out the slow part of your code. For example i had 30 000 lines

RE: [PHP] Re: oop too slow

2004-08-19 Thread Jay Blanchard
[snip] > [snip] > Yes it does. Do you think it's not so slow ? > > > [snip] > > Well, I changed my script a little for tests and turned off the > queries. > > Now > > I'm setting some defaults data to those 300 objects but it's still too > > slow. > > I create for every value, key and product a dif

RE: [PHP] Re: oop too slow

2004-08-19 Thread Jay Blanchard
[snip] Yes it does. Do you think it's not so slow ? > [snip] > Well, I changed my script a little for tests and turned off the queries. > Now > I'm setting some defaults data to those 300 objects but it's still too > slow. > I create for every value, key and product a different object so it's in >

RE: [PHP] Re: oop too slow

2004-08-19 Thread Jay Blanchard
[snip] Well, I changed my script a little for tests and turned off the queries. Now I'm setting some defaults data to those 300 objects but it's still too slow. I create for every value, key and product a different object so it's in fact 30*10*5 objects. Then I run __toString() method one by one an

[PHP] Re: oop too slow

2004-08-19 Thread Krzysztof Gorzelak
> > Each object gets data from mysql by itself. The generation time of 1 > > category [30 products, 10 keys, 5 values ~= 300 mysql queries] takes as I > > said more than a 1s (on quite fast machine). How can this model be improved? > > Why are you doing 300(!!!) mysql queries? > I guess you can

[PHP] Re: oop too slow

2004-08-19 Thread Krzysztof Gorzelak
> > Each object gets data from mysql by itself. The generation time of 1 > > category [30 products, 10 keys, 5 values ~= 300 mysql queries] takes as I > > said more than a 1s (on quite fast machine). How can this model be improved? > > Why are you doing 300(!!!) mysql queries? > I guess you ca

[PHP] Re: oop too slow

2004-08-19 Thread Aidan Lister
Krzysztof, Take a look at some PHP Profiling extensions, such as Advanced PHP Debugger or XDebug. This will help you locate the slow parts of your script. "Krzysztof Gorzelak" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi > I'm trying my new php5 script, but it takes about 1.

[PHP] Re: oop too slow

2004-08-19 Thread Angelo Zanetti
maybe you can rewrite your SQL statements in a way that will improve retrieval time. Google for it. things like select * from ... when you are not using all fields is bad practise. there are many others. Angelo >>> Thomas Seifert <[EMAIL PROTECTED]> 8/19/2004 11:33:05 AM >>> On Thu, 19 Aug 2004 1

[PHP] Re: oop too slow

2004-08-19 Thread Thomas Seifert
On Thu, 19 Aug 2004 11:21:16 +0200, Krzysztof Gorzelak wrote: > Each object gets data from mysql by itself. The generation time of 1 > category [30 products, 10 keys, 5 values ~= 300 mysql queries] takes as I > said more than a 1s (on quite fast machine). How can this model be improved? Why