473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

php object performance


Hello there!

I've tried to gather some infos about php object performance.
I got started developing an app using php object and have the worst
requests time I ever seen.
I mean, once all my classes uploaded on a host, I call index.php to
get classes instanciations and it could take 55sec to generate the
first response and about 1 or 2 sec for the following calls..
...and I'm scared about those latencies.^^
I only have less than 10 classes with inheritance and some calls to
SQL server but it sounds that I don't follow some basic rules.. ^^
Hm... how do I have to consider php object performance ? What searches
have I to make ??
I'm getting lost.. I don't know what and where to look after.. ^^

any idea ?

Thanks a lot :)

Jun 28 '07 #1
9 1374
On Jun 28, 8:30 am, PaowZ <gpa...@gmail.comwrote:
Hello there!

I've tried to gather some infos about php object performance.
I got started developing an app using php object and have the worst
requests time I ever seen.
I mean, once all my classes uploaded on a host, I call index.php to
get classes instanciations and it could take 55sec to generate the
first response and about 1 or 2 sec for the following calls..
..and I'm scared about those latencies.^^
I only have less than 10 classes with inheritance and some calls to
SQL server but it sounds that I don't follow some basic rules.. ^^
Hm... how do I have to consider php object performance ? What searches
have I to make ??
I'm getting lost.. I don't know what and where to look after.. ^^

any idea ?

Thanks a lot :)
I highly doubt that "php objects" are to blame for your problems --
more likely something in the code itself. Even more likely something
to do with the database. Get a profiler to figure out where the
problem is, or place some strategic echo's throughout your code and
run some timing tests.

Jun 28 '07 #2
On 28 juin, 14:42, ZeldorBlat <zeldorb...@gmail.comwrote:
On Jun 28, 8:30 am, PaowZ <gpa...@gmail.comwrote:


Hello there!
I've tried to gather some infos about php object performance.
I got started developing an app using php object and have the worst
requests time I ever seen.
I mean, once all my classes uploaded on a host, I call index.php to
get classes instanciations and it could take 55sec to generate the
first response and about 1 or 2 sec for the following calls..
..and I'm scared about those latencies.^^
I only have less than 10 classes with inheritance and some calls to
SQL server but it sounds that I don't follow some basic rules.. ^^
Hm... how do I have to consider php object performance ? What searches
have I to make ??
I'm getting lost.. I don't know what and where to look after.. ^^
any idea ?
Thanks a lot :)

I highly doubt that "php objects" are to blame for your problems --
more likely something in the code itself. Even more likely something
to do with the database. Get a profiler to figure out where the
problem is, or place some strategic echo's throughout your code and
run some timing tests.- Masquer le texte des messages précédents -

- Afficher le texte des messages précédents -
a profiler?? I've heard a little about it.. ok, I give a try.. and let
you know, if necessary.. thanks ZeldorBlat

Jun 28 '07 #3
PaowZ wrote:
I got started developing an app using php object and have the worst
requests time I ever seen.
Are you using autoloading?

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 7 days, 18:22.]

Long-Awaited Zeldman Article
http://tobyinkster.co.uk/blog/2007/0...ldman-in-time/
Jun 28 '07 #4
On 28 juin, 16:42, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
PaowZ wrote:
I got started developing an app using php object and have the worst
requests time I ever seen.

Are you using autoloading?

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 7 days, 18:22.]

Long-Awaited Zeldman Article
http://tobyinkster.co.uk/blog/2007/0...ldman-in-time/
No, I gave up knowing that this magic function is costly.. I prefer
require_once() the right class when needed.. :)
Jun 28 '07 #5
On Jun 28, 11:34 am, PaowZ <gpa...@gmail.comwrote:
On 28 juin, 16:42, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
PaowZ wrote:
I got started developing an app using php object and have the worst
requests time I ever seen.
Are you using autoloading?
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 7 days, 18:22.]
Long-Awaited Zeldman Article
http://tobyinkster.co.uk/blog/2007/0...ldman-in-time/

No, I gave up knowing that this magic function is costly.. I prefer
require_once() the right class when needed.. :)
How do you know it's costly? I've never had a problem with it...

Jun 28 '07 #6
Rik
On Thu, 28 Jun 2007 18:01:22 +0200, ZeldorBlat <ze********@gmail.com>
wrote:
On Jun 28, 11:34 am, PaowZ <gpa...@gmail.comwrote:
>On 28 juin, 16:42, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
PaowZ wrote:
I got started developing an app using php object and have the worst
requests time I ever seen.
Are you using autoloading?
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 7 days, 18:22.]
Long-Awaited Zeldman Article
http://tobyinkster.co.uk/blog/2007/0...ldman-in-time/

No, I gave up knowing that this magic function is costly.. I prefer
require_once() the right class when needed.. :)

How do you know it's costly? I've never had a problem with it...
Indeed, autoloading is not the same as preloading. It should have very
little effect on resources.

--
Rik Wasmus
Jun 28 '07 #7
On 28 juin, 18:08, Rik <luiheidsgoe...@hotmail.comwrote:
On Thu, 28 Jun 2007 18:01:22 +0200, ZeldorBlat <zeldorb...@gmail.com
wrote:


On Jun 28, 11:34 am, PaowZ <gpa...@gmail.comwrote:
On 28 juin, 16:42, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
PaowZ wrote:
I got started developing an app using php object and have the worst
requests time I ever seen.
Are you using autoloading?
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 7 days, 18:22.]
Long-Awaited Zeldman Article
http://tobyinkster.co.uk/blog/2007/0...ldman-in-time/
No, I gave up knowing that this magic function is costly.. I prefer
require_once() the right class when needed.. :)
How do you know it's costly? I've never had a problem with it...

Indeed, autoloading is not the same as preloading. It should have very
little effect on resources.

--
Rik Wasmus- Masquer le texte des messages précédents -

- Afficher le texte des messages précédents -
Really? actually, I read this hint on some websites.. that may be
false, however :)
well, concerning my issue. the following request:
SELECT COUNT(*) AS nbre FROM information_schema.tables WHERE
`table_type` = 'BASE TABLE'
...is responsible for such a latency. It uses predefined tables in
mySQL engine... I switched to an other board (comp...mysql) to discuss
it.. :)

Jun 28 '07 #8
On Jun 28, 12:25 pm, PaowZ <gpa...@gmail.comwrote:
On 28 juin, 18:08, Rik <luiheidsgoe...@hotmail.comwrote:
On Thu, 28 Jun 2007 18:01:22 +0200, ZeldorBlat <zeldorb...@gmail.com>
wrote:
On Jun 28, 11:34 am, PaowZ <gpa...@gmail.comwrote:
>On 28 juin, 16:42, Toby A Inkster <usenet200...@tobyinkster.co.uk>
>wrote:
PaowZ wrote:
I got started developing an app using php object and have the worst
requests time I ever seen.
Are you using autoloading?
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 7 days, 18:22.]
Long-Awaited Zeldman Article
http://tobyinkster.co.uk/blog/2007/0...ldman-in-time/
>No, I gave up knowing that this magic function is costly.. I prefer
>require_once() the right class when needed.. :)
How do you know it's costly? I've never had a problem with it...
Indeed, autoloading is not the same as preloading. It should have very
little effect on resources.
--
Rik Wasmus- Masquer le texte des messages précédents -
- Afficher le texte des messages précédents -

Really? actually, I read this hint on some websites.. that may be
false, however :)
well, concerning my issue. the following request:
SELECT COUNT(*) AS nbre FROM information_schema.tables WHERE
`table_type` = 'BASE TABLE'
..is responsible for such a latency. It uses predefined tables in
mySQL engine... I switched to an other board (comp...mysql) to discuss
it.. :)
Don't trust everything the internet tells you. Try something first,
then optimize if you run into problems. Often you'll find that the
problem has little to do with what you thought it did and everything
to do with what you didn't think it did (as this thread is evidence
of).

Google around for "Premature Optimization" and see what you can find.

Jun 28 '07 #9
On 28 juin, 19:03, ZeldorBlat <zeldorb...@gmail.comwrote:
On Jun 28, 12:25 pm, PaowZ <gpa...@gmail.comwrote:


On 28 juin, 18:08, Rik <luiheidsgoe...@hotmail.comwrote:
On Thu, 28 Jun 2007 18:01:22 +0200, ZeldorBlat <zeldorb...@gmail.com>
wrote:
On Jun 28, 11:34 am, PaowZ <gpa...@gmail.comwrote:
On 28 juin, 16:42, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
PaowZ wrote:
I got started developing an app using php object and have the worst
requests time I ever seen.
Are you using autoloading?
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 7 days, 18:22.]
Long-Awaited Zeldman Article
http://tobyinkster.co.uk/blog/2007/0...ldman-in-time/
No, I gave up knowing that this magic function is costly.. I prefer
require_once() the right class when needed.. :)
How do you know it's costly? I've never had a problem with it...
Indeed, autoloading is not the same as preloading. It should have very
little effect on resources.
--
Rik Wasmus- Masquer le texte des messages précédents -
- Afficher le texte des messages précédents -
Really? actually, I read this hint on some websites.. that may be
false, however :)
well, concerning my issue. the following request:
SELECT COUNT(*) AS nbre FROM information_schema.tables WHERE
`table_type` = 'BASE TABLE'
..is responsible for such a latency. It uses predefined tables in
mySQL engine... I switched to an other board (comp...mysql) to discuss
it.. :)

Don't trust everything the internet tells you.
Sure :).. usually, I run into empirical tests before taking any
decisions. And I am aware that premature optimization could lead into
troubles.. but how to start optimizing after conception without having
to remove/modify essential pieces of code due to optimizations ? I
think this is a debate that deserves its own thread, I'm off topic :).
Interesting debate, though.
Google around for "Premature Optimization" and see what you can find.
I'll have a look :)
Thanks ZeldorBlat.
Jun 28 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Rodd Snook | last post by:
I have an application which makes extensive use of the Scripting.Dictionary object. I'm not doing anything silly like putting them outside the page scope -- just creating quite a few of them and...
1
by: Az Tech | last post by:
Hi people, (Sorry for the somewhat long post). I request some of the people on this group who have good experience using object-orientation in the field, to please give some good ideas for...
2
by: Unruled Boy | last post by:
1.The follow two ways to declare one object: any difference? especially its performance. a.Private m_objMyObject As MyObject=New MyObject() b.Private m_objMyObject As MyObject m_objMyObject=New...
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
0
by: Craig Rodrigues | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.object.corba.tao This is a formal Request For Discussion (RFD) to create comp.object.corba.tao as an unmoderated world-wide Usenet newsgroup...
0
by: Cristina | last post by:
Hello NG, I want to create a new performance object with own counters in my application to access them later in the Performance monitor. How I can relize this problem. The example program...
2
by: John Mullin | last post by:
We are having a problem which appears similar to a previous posting: http://groups.google.com/groups?hl=en&lr=&frame=right&th=d97f552e10f8c94c&seekm=OZw33z9EDHA.2312%40TK2MSFTNGP10.phx.gbl#link1 ...
15
by: matko | last post by:
Hi! In one of the two examples for the PaintEventArgs.Graphics-property (in the VS 2005 documentation), the Graphics-object is "saved" to a local variable, before being used. In the other...
15
by: Buddy Home | last post by:
Hello, I'm trying to speed up a piece of code that is causing performance issues with our product. The problem is we are using serialization to convert the object to a string, this is costing us...
13
by: orobalage | last post by:
Hi! I was developing some number-crunching algorithms for my university, and I put the processor into a class. While testing, I found a quite *severe performance problem* when the object was...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.