John Siracusa <[EMAIL PROTECTED]> writes: > Hooks tend to be performance drains, especially in Perl where method > call overhead is significant. "Check for any pre-foo hooks, do foo, > check for any on-foo hooks, check for any post-foo hooks, and > finally return." It all adds up.
Yeah, I know, I use emacs and all. :) > RDBO is designed to be subclassed. Overriding load() and save() is > straightforward, and probably the most common subclassing task. I > suggest customizing your common RDBO-derived base class and adding > the hook you describe. It'll be reasonably efficient for you > because you know exactly what you want to do. And considering that my actual needs are for the simpler case, so much the better. > (Rose::DB::Object::Cached is meant as an example of this appraoch.) > I'd probably create Rose::DB::Object::Partitioned, were I to have > some bright idea about a very generic way to do it. Yeah, in the end, I suspect you're right. And, I hadn't noticed RDBO::Cached before, glad you mentioned it. So what I'm likely to end up with here is actually my own RDBO::MAD (say) that hooks in with memcached as well as managing the split between storage and retrieval. > You, OTOH, just need to know how to do specifically what you want to > do. And you seem to, so do it! :) If you need any help in the > implementation, just ask. But I think it'll be pretty smooth for > you. It's probably a next-project thing anyway---I need to get this current one out the door, and reshuffling the DB layer at this point would not be conducive. But then... Mike -- Thrills become as cheap as gas, and gas as cheap as thrills -- Blue Oyster Cult ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object