Login | Register
My pages Projects Community openCollabNet

Reply to message

* = Required fields
* Subject
* Body
Send reply to
Author (directly in email)
Please type the letters in the image above.

Original message

Author Oliver Schonrock <oliver@realtsp.com>
Full name Oliver Schonrock <oliver@realtsp.com>
Date 2007-07-12 06:40:03 PDT
Message Hans Lellelid wrote:
> This looks interesting, Oliver. Other than not being able to use
> user-defined class with persistent connection (am I understanding that
> correctly? seems odd),

I agree it is odd. but that's what the docs say...

We do not use persistent connections because:
a) it creates a huge number of sleeping connections when you have 100+
http processes and multiple databases.

b) the time saving is not significant for us given the time taken to run
the queries and rest of app (connect time ~ 1ms, query time is often >
30ms and total parse time 50-200ms). These things obviously vary with
applications, but i guess most propel applications are less than trivial
and therefore may not benefit from the small saving of a persistent

> were there any other limitations?

Not that I am aware of. The overiding of PDO::query() was slightly
tricky because of that slightly mad syntax required to call "parent"
conveniently with variable number and type of params:


$args = func_get_args();
call_user_func_array​(array($this, 'parent::query'), $args)

but it works well. So well that I decided to use it for the constructor
too with its 4 params that could change in the future.


Oliver Schonrock