empirical data is that if you comment out the "RegistryManager" in config/middleware.py, you get much better req/sec (but you cant use any of the gloabals...).
In fact, isn't the whole purpose of this registry facility to enable request-local objects (such as the "request" object) to be accessed as globals (e.g not having to pass them as arguments to the action) ? So to support a bad programming paradigm (using globals) the solution is to have another inefficient layer to make sure accessing those globals doesn't cause any scoping and synchronization issues ??? Why not just get rid of the bad paradigm ? In Pylons 2 all pertinent information about the request would be passed to the user's action method as explicit arguments. On Jan 20, 11:37 am, Ian Bicking <[email protected]> wrote: > On Tue, Jan 20, 2009 at 11:36 AM, Ben Bangert <[email protected]> wrote: > > Similarly, other request handling operations such as creating the > >> request object may also be redundant, because the user may not be > >> interested in all the attributes of the request object. So wouldn't it > >> be better to provide those things on-demand (that is using a call > >> interface to get things such as params, etc) instead of creating all > >> that stuff by default even when it may not be needed ? > > > Sure, and its possible some other things in webob.Request might be more > > lazily done, though at the moment, most every attribute on it only actually > > does its work upon access. If you can see any specific locations in it that > > may be further optimized, that'd be great. > > If anyone does put together something to target webob performance > specifically, that'd make the webob optimization happen a lot faster ;) > Instantiation *shouldn't* be slow (I can't say for sure if that's true, but > if it's not I'll want to fix that). And probably there's some features in > Request that should actually be taken out (like environ_getter), that might > be causing some overhead. But I'd rather work from empirical data, and I > haven't gotten around to putting that together. > > -- > Ian Bicking | http://blog.ianbicking.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
