Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: [propel-dev] translation

propel
Discussion topic

Hide all messages in topic

All messages in topic

Re: [propel-dev] Query counting

Reply

Author Cameron Brunner <cameron dot brunner at gmail dot com>
Full name Cameron Brunner <cameron dot brunner at gmail dot com>
Date 2007-07-12 15:02:17 PDT
Message 8am, time for work, untested but it should work... needs comments put
back in it etc but i was mostly interested in getting this done for
now.

Enjoy!

On 7/13/07, Cameron Brunner <cameron.brunner@​gmail.com> wrote:
> Interest permits from me until i goto work this morning, playing now :)
>
> On 7/13/07, Hans Lellelid <hans at velum dot net> wrote:
> > I'd add that perhaps what Oliver has written becomes the first version
> > of DebugPropelPDO -- and we can add these new features in as time and
> > interest permits.
> >
> > Hans
> >
> > Hans Lellelid wrote:
> > > I think that's a very good suggestion.
> > >
> > > Hans
> > >
> > > Cameron Brunner wrote:
> > >> I would be more interested at this point in offering DebugPropelPDO as
> > >> a connection object type and adding a full array of debug info (query
> > >> timing, counting, dupe query detection) to it and have a flag that
> > >> switches to it when requested. Query timing generally interests me
> > >> more than the count.
> > >>
> > >> Just my 2c
> > >>
> > >> On 7/13/07, Oliver Schonrock <oliver at realtsp dot com> wrote:
> > >>> 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), were there any other limitations?
> > >>>>
> > >>> I checked what the story is with that "Cannot be used with persistent
> > >>> PDO
> > >>> instances.". It throws a PHP warning and behaves irractically. Suspect
> > >>> it's kind of like unserializing a class from session without having the
> > >>> class defined first. ie you get half an object.
> > >>>
> > >>> better patch takes care of the "Cannot be used with persistent PDO
> > >>> instances." problem by checking the PDO config and refusing to subclass
> > >>> PDOStatement. Consequently the getQueryCount() method doesn't work
> > >>> correctly anymore and therefore throws an exception.
> > >>>
> > >>> this should ensure backward compatibility.
> > >>>
> > >>> http://propel.phpdb.​org/trac/ticket/454#​comment:2
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>
> > >
> > > --------------------​--------------------​--------------------​---------
> > > To unsubscribe, e-mail: dev-unsubscribe@prop​el.tigris.org
> > > For additional commands, e-mail: dev-help at propel dot tigris dot org
> > >
> >
> > --------------------​--------------------​--------------------​---------
> > To unsubscribe, e-mail: dev-unsubscribe@prop​el.tigris.org
> > For additional commands, e-mail: dev-help at propel dot tigris dot org
> >
> >
>
>
> --
> Cameron Brunner
>
> Want a better web browser?
> http://www.spreadfir​efox.com/?q=affiliat​es&id=182780​&t=1
>


--
Cameron Brunner

Want a better web browser?
http://www.spreadfir​efox.com/?q=affiliat​es&id=182780​&t=1
Attachments

Re: [propel-dev] Query counting

Reply

Author Cameron Brunner <cameron dot brunner at gmail dot com>
Full name Cameron Brunner <cameron dot brunner at gmail dot com>
Date 2007-07-12 14:34:25 PDT
Message Interest permits from me until i goto work this morning, playing now :)

On 7/13/07, Hans Lellelid <hans at velum dot net> wrote:
> I'd add that perhaps what Oliver has written becomes the first version
> of DebugPropelPDO -- and we can add these new features in as time and
> interest permits.
>
> Hans
>
> Hans Lellelid wrote:
> > I think that's a very good suggestion.
> >
> > Hans
> >
> > Cameron Brunner wrote:
> >> I would be more interested at this point in offering DebugPropelPDO as
> >> a connection object type and adding a full array of debug info (query
> >> timing, counting, dupe query detection) to it and have a flag that
> >> switches to it when requested. Query timing generally interests me
> >> more than the count.
> >>
> >> Just my 2c
> >>
> >> On 7/13/07, Oliver Schonrock <oliver at realtsp dot com> wrote:
> >>> 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), were there any other limitations?
> >>>>
> >>> I checked what the story is with that "Cannot be used with persistent
> >>> PDO
> >>> instances.". It throws a PHP warning and behaves irractically. Suspect
> >>> it's kind of like unserializing a class from session without having the
> >>> class defined first. ie you get half an object.
> >>>
> >>> better patch takes care of the "Cannot be used with persistent PDO
> >>> instances." problem by checking the PDO config and refusing to subclass
> >>> PDOStatement. Consequently the getQueryCount() method doesn't work
> >>> correctly anymore and therefore throws an exception.
> >>>
> >>> this should ensure backward compatibility.
> >>>
> >>> http://propel.phpdb.​org/trac/ticket/454#​comment:2
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >
> > --------------------​--------------------​--------------------​---------
> > To unsubscribe, e-mail: dev-unsubscribe@prop​el.tigris.org
> > For additional commands, e-mail: dev-help at propel dot tigris dot org
> >
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: dev-unsubscribe@prop​el.tigris.org
> For additional commands, e-mail: dev-help at propel dot tigris dot org
>
>


--
Cameron Brunner

Want a better web browser?
http://www.spreadfir​efox.com/?q=affiliat​es&id=182780​&t=1

Re: [propel-dev] Query counting

Reply

Author hlellelid
Full name Hans Lellelid
Date 2007-07-12 14:32:11 PDT
Message I'd add that perhaps what Oliver has written becomes the first version
of DebugPropelPDO -- and we can add these new features in as time and
interest permits.

Hans

Hans Lellelid wrote:
> I think that's a very good suggestion.
>
> Hans
>
> Cameron Brunner wrote:
>> I would be more interested at this point in offering DebugPropelPDO as
>> a connection object type and adding a full array of debug info (query
>> timing, counting, dupe query detection) to it and have a flag that
>> switches to it when requested. Query timing generally interests me
>> more than the count.
>>
>> Just my 2c
>>
>> On 7/13/07, Oliver Schonrock <oliver at realtsp dot com> wrote:
>>> 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), were there any other limitations?
>>>>
>>> I checked what the story is with that "Cannot be used with persistent
>>> PDO
>>> instances.". It throws a PHP warning and behaves irractically. Suspect
>>> it's kind of like unserializing a class from session without having the
>>> class defined first. ie you get half an object.
>>>
>>> better patch takes care of the "Cannot be used with persistent PDO
>>> instances." problem by checking the PDO config and refusing to subclass
>>> PDOStatement. Consequently the getQueryCount() method doesn't work
>>> correctly anymore and therefore throws an exception.
>>>
>>> this should ensure backward compatibility.
>>>
>>> http://propel.phpdb.​org/trac/ticket/454#​comment:2
>>>
>>>
>>>
>>>
>>>
>>
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: dev-unsubscribe@prop​el.tigris.org
> For additional commands, e-mail: dev-help at propel dot tigris dot org
>

Re: [propel-dev] Query counting

Reply

Author hlellelid
Full name Hans Lellelid
Date 2007-07-12 14:29:11 PDT
Message I think that's a very good suggestion.

Hans

Cameron Brunner wrote:
> I would be more interested at this point in offering DebugPropelPDO as
> a connection object type and adding a full array of debug info (query
> timing, counting, dupe query detection) to it and have a flag that
> switches to it when requested. Query timing generally interests me
> more than the count.
>
> Just my 2c
>
> On 7/13/07, Oliver Schonrock <oliver at realtsp dot com> wrote:
>> 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), were there any other limitations?
>> >
>>
>> I checked what the story is with that "Cannot be used with persistent
>> PDO
>> instances.". It throws a PHP warning and behaves irractically. Suspect
>> it's kind of like unserializing a class from session without having the
>> class defined first. ie you get half an object.
>>
>> better patch takes care of the "Cannot be used with persistent PDO
>> instances." problem by checking the PDO config and refusing to subclass
>> PDOStatement. Consequently the getQueryCount() method doesn't work
>> correctly anymore and therefore throws an exception.
>>
>> this should ensure backward compatibility.
>>
>> http://propel.phpdb.​org/trac/ticket/454#​comment:2
>>
>>
>>
>>
>>
>
>

Re: [propel-dev] Query counting

Reply

Author Cameron Brunner <cameron dot brunner at gmail dot com>
Full name Cameron Brunner <cameron dot brunner at gmail dot com>
Date 2007-07-12 14:27:16 PDT
Message I would be more interested at this point in offering DebugPropelPDO as
a connection object type and adding a full array of debug info (query
timing, counting, dupe query detection) to it and have a flag that
switches to it when requested. Query timing generally interests me
more than the count.

Just my 2c

On 7/13/07, Oliver Schonrock <oliver at realtsp dot com> wrote:
> 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), were there any other limitations?
> >
>
> I checked what the story is with that "Cannot be used with persistent PDO
> instances.". It throws a PHP warning and behaves irractically. Suspect
> it's kind of like unserializing a class from session without having the
> class defined first. ie you get half an object.
>
> better patch takes care of the "Cannot be used with persistent PDO
> instances." problem by checking the PDO config and refusing to subclass
> PDOStatement. Consequently the getQueryCount() method doesn't work
> correctly anymore and therefore throws an exception.
>
> this should ensure backward compatibility.
>
> http://propel.phpdb.​org/trac/ticket/454#​comment:2
>
>
>
>
>


--
Cameron Brunner

Want a better web browser?
http://www.spreadfir​efox.com/?q=affiliat​es&id=182780​&t=1

Re: [propel-dev] Query counting

Reply

Author Oliver Schonrock <oliver at realtsp dot com>
Full name Oliver Schonrock <oliver at realtsp dot com>
Date 2007-07-12 11:25:28 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), were there any other limitations?
>

 I checked what the story is with that "Cannot be used with persistent PDO
 instances.". It throws a PHP warning and behaves irractically. Suspect
 it's kind of like unserializing a class from session without having the
 class defined first. ie you get half an object.

 better patch takes care of the "Cannot be used with persistent PDO
 instances." problem by checking the PDO config and refusing to subclass
 PDOStatement. Consequently the getQueryCount() method doesn't work
 correctly anymore and therefore throws an exception.

 this should ensure backward compatibility.

http://propel.phpdb.​org/trac/ticket/454#​comment:2
Attachments

Re: [propel-dev] Query counting

Reply

Author Oliver Schonrock <oliver at realtsp dot com>
Full name Oliver Schonrock <oliver at realtsp dot 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
connection?

> 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:

http://uk.php.net/ma​nual/en/function.PDO​-query.php

$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
Attachments

Re: [propel-dev] Query counting

Reply

Author hlellelid
Full name Hans Lellelid
Date 2007-07-12 05:43:28 PDT
Message Oliver Schonrock wrote:
> We find the ability to count queries executed during a request useful
> during profiling.
>
> I have added a new issue to trac with a patch for that:
>
> http://propel.phpdb.​org/trac/ticket/454
>
> Feedback? Commit?
>

This looks interesting, Oliver. Other than not being able to use
user-defined class with persistent connection (am I understanding that
correctly? seems odd), were there any other limitations?

Hans

Query counting

Reply

Author Oliver Schonrock <oliver at realtsp dot com>
Full name Oliver Schonrock <oliver at realtsp dot com>
Date 2007-07-12 05:38:54 PDT
Message We find the ability to count queries executed during a request useful
during profiling.

I have added a new issue to trac with a patch for that:

http://propel.phpdb.​org/trac/ticket/454

Feedback? Commit?

--

Oliver Schonrock
Attachments

Re: [propel-dev] translation

Reply

Author hlellelid
Full name Hans Lellelid
Date 2007-07-10 09:52:07 PDT
Message Hi,

propel_pl wrote:
> Hi.
>
> I'm a memeber of php.pl community
> I think, I can help to translate User Guide to polish language. There is a lot of propel users in Poland, and i think some of them will help. Is it possible to get trac account?
>

Sure -- we'd be grateful for the translation help.

Please contact me off-list with a preferred username.

Cheers,
Hans

translation

Reply

Author cysio
Full name Krzysio
Date 2007-07-10 09:28:18 PDT
Message Hi.

I'm a memeber of php.pl community
I think, I can help to translate User Guide to polish language. There is a lot of propel users in Poland, and i think some of them will help. Is it possible to get trac account?

best regards
Chris aka cysiaczek
http://forum.php.pl/​Cysiaczek-m6040.html​
Page: of 2 « Previous | Next »
Messages per page: