Re: [dev] datatree: getObject for nonexistent objects
  Home FAQ Contact Sign in
mailing.www.horde-dev only
 
Advanced search
POPULAR GROUPS

more...

mailing.www.horde-dev Profile…
 Up
Re: [dev] datatree: getObject for nonexistent objects         


Author: Chuck Hagenbuch
Date: Jan 25, 2007 21:46

Quoting Karsten Fourmont :
> I just realized that calling DataTree:getObject is extremly costly
> for nonexistent objects (with sql backend). If you do this:

Thanks for this analysis!

I was uncomfortable with the change at first, but I did some poking
around and committed this set, which includes your change but also
goes a bit beyond it:

http://lists.horde.org/archives/cvs/Week-of-Mon-20070122/064958.html

Now, when calling any of exists(), getId(), or getName(), if an object
isn't already loaded, we simply check the backend for it instead of
trying to load it and then seeing if it's there. This removes some of
the "on-demand" aspect of the datatree, but that's in all likelihood a
good thing. May result in a few bugs to iron out but I've already
tested it with 6-7 datatree using apps plus the admin screens.

Let me know how that looks/performs,
-chuck

--
"we are plastered to the windshield of the bus that is time." - Chris
Show full article (1.16Kb)
no comments