[dev] Links API + performance

Chuck Hagenbuch chuck at horde.org
Tue Oct 14 15:43:59 PDT 2003


Quoting Bo Daley <bo at tilda.com.au>:

> * get all the links for this module from the Links API
> * unserialize all the Turba object IDs from these links one by one
> * get the names for each client from Turba's API one by one
>
> this works ok when there are only 2 or 3 clients attached to a module but
> doesn't scale too well.
>
> can anyone think of a better way to approach links between objects in
> different apps (while still keeping them nice and generic)? In the meantime
> I'll keep trying out some more ideas...

Yes.

1. Ditch the SQL driver/serialization for links, and rewrite it to use
categories (and category_attributes for what's currently serialized).

2. Make sure that Turba (and other apps) have batch-fetching api calls, where
you can pass in an array of ids, and get back the info you need for all of
them.

That should reduce the load to 2 api calls, even for 500 clients, which, with
some careful coding, should result in only 2-4 SQL calls.

-chuck

--
Charles Hagenbuch, <chuck at horde.org>
Born right the first time.


More information about the dev mailing list