Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: [propel-dev] Query counting

propel
Discussion topic

Back to topic list

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-19 13:36:08 PDT
Message This is meant to be a preproduction debug flag that enables extra
debug methods so you get some real query information, not just a basic
here's your queries in their prepared state and oh yea, here's what
went into each of the ?'s but dont ask me to show you the final query.
xdebug is great, i love it, not many people have it even still tho
plus its trace format (kcachegrind) means that you have to open up
your trace to view it, its not just appended to the current page and
there are no easy ways to see "shit, propel took 2 seconds to hydrate,
wtf is going on" and thats the aim of this

again, this is NOT for production environments, if you read the code
you will see that its been done as lightweight as possible as far as
only when debug is enabled

On 7/20/07, Christian Kassab <chris dot kassab at gmail dot com> wrote:
> Hi,
>
> why stuff so much debugging functionality into Propel? It is bloated
> as it is already. How about using debugging tools like xdebug and
> Eclipse? Yes I know you can't look into what goes on inside PDO as in
> what the final query string looks like after binding the
> variables/parameters, but thats another story...
>
> If you really need the lower level debugging inside Propel then add it
> in a non obtrusive way by enabling dependency injection of classes
> that subclass the default ones but add the debugging functionality and
> then call the parent methods etc.
>
> Cheers,
>
> Christian
>
> On 19/07/07, Hans Lellelid <hans at velum dot net> wrote:
> > Oliver Schonrock wrote:
> > > Cameron Brunner wrote:
> > >> Silence is good bad or otherwise?
> > >
> > > Don't take offense please. I like the features, but I am not sure about
> > > the implementation:
> > >
> > > - using static $query seems untidy
> > > - using __destruct() can cause problems depending on your environment
> > > - using direct var_dump() it not always suitable.
> > >
> > > if we are going to add this to the core propel repository, my view would
> > > be that it should meet the same criteria as the rest of the code as a
> > > generic, high quality toolkit.
> > >
> > > Part of the reason I focused on simple features was that it is not
> > > obvious how to solve some of the above problems with the more advanced
> > > features while adhering to the quality standards of the rest of the
> > > code. ie can run in any environment, etc..
> > >
> > > Opinions?
> >
> > Without having looked at the code, I second this opinion. We definitely
> > don't want to use var_dump, for instance, as this is not particularly
> > useful when building webapps that don't return HTML (i.e. that return
> > XML/XML-RPC, JSON, etc.).
> >
> > My input would be that we need the default PropelPDO to be as
> > unencumbered as possible (fast). If we're going to keep all the debug
> > stuff in a separate object, then it doesn't matter much how that
> > performs. If, however, the aim is to merge this into PropelPDO, then we
> > need to make sure that we're doing things in an optimized -- and yes,
> > "correct" -- way. We definitely don't want to open the door for subtle
> > PHP issues.
> >
> > One thing I have learned from using Propel + PDO in PHP 5.2.2 is that
> > PDO is not particularly bug-free :) I have dealt with a number of
> > segfaults that are directly traceable to PDO. Sometimes it is the
> > result of a malformed query (why this segfaults, I have no idea) --- or
> > use of PDO streams within user-defined stream wrappers. I *hate*
> > debugging segfaults in PHP; what a waste of time. There's apparently
> > some really messy stuff under the hood there :) Let's do what we can to
> > keep it from rearing its ugly head for users.
> >
> > Hans
> >
> > --------------------​--------------------​--------------------​---------
> > To unsubscribe, e-mail: dev-unsubscribe@prop​el.tigris.org
> > For additional commands, e-mail: dev-help at propel dot tigris dot org
> >
> >
>
>
> --
> Christian Kassab
>
> Mobile:
> +44 (0)789 4467 606
> +49 (0)163 6360 939
>
> Mail:
> chris dot kassab at binaryworx dot net
> chris dot kassab at gmail dot com
>
> Web:
> http://www.binaryworx.net
> http://www.shoreflyer.net
>
> --------------------​--------------------​--------------------​---------
> 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

« Previous message in topic | 31 of 36 | Next message in topic »

Messages

Show all messages in topic

                                                             Re: [propel-dev] Query counting Christian Kassab <chris dot kassab at gmail dot com> Christian Kassab <chris dot kassab at gmail dot com> 2007-07-19 07:25:22 PDT
                                                                 Re: [propel-dev] Query counting hlellelid Hans Lellelid 2007-07-19 08:56:10 PDT
                                                                 Re: [propel-dev] Query counting Pedram Nimreezi <zenstyle at gmail dot com> Pedram Nimreezi <zenstyle at gmail dot com> 2007-07-19 11:22:04 PDT
                                                                     Re: [propel-dev] Query counting Christian Kassab <chris dot kassab at gmail dot com> Christian Kassab <chris dot kassab at gmail dot com> 2007-07-19 13:41:31 PDT
                                                                         Re: [propel-dev] Query counting Pedram Nimreezi <zenstyle at gmail dot com> Pedram Nimreezi <zenstyle at gmail dot com> 2007-07-19 18:21:13 PDT
                                                                 Re: [propel-dev] Query counting Cameron Brunner <cameron dot brunner at gmail dot com> Cameron Brunner <cameron dot brunner at gmail dot com> 2007-07-19 13:36:08 PDT
                                                             Re: [propel-dev] Query counting Cameron Brunner <cameron dot brunner at gmail dot com> Cameron Brunner <cameron dot brunner at gmail dot com> 2007-07-19 13:32:38 PDT
                                                         Re: [propel-dev] Query counting Cameron Brunner <cameron dot brunner at gmail dot com> Cameron Brunner <cameron dot brunner at gmail dot com> 2007-07-19 13:30:30 PDT
         Re: [propel-dev] translation cysio Krzysio 2007-12-27 02:11:27 PST
             Re: [propel-dev] translation hlellelid Hans Lellelid 2007-12-27 04:07:50 PST
                 Re: [propel-dev] translation cysio Krzysio 2007-12-27 04:27:41 PST
Page: of 2 « Previous | Next »
Messages per page: