[Evolution-hackers] speed iup on calendar



Hi

We all know about bug #59904, and that I sent a patch which fixed it but
broke the support for getting detached recurrences while generating
instances.

The cause of the slowdown was repetitive calls to get_object_list ("uid
= $uid") for each object, which caused backends to go over all the
stored objects again and again to run queries.

I've now fixed it on HEAD, by adding a new call,
e_cal_get_objects_for_uid, which returns a list of all objects for a
given UID. This makes things much quicker, since now the backend just
needs to look up in the objects hash table, and, for that object, in the
recurrences hash table, all accessed by nice indexes.

Backends need now to return, in the getObject call, a VCALENDAR string
if there is more than one single object (ie, if there are detached
recurrences) for that UID. The file backend is already changed to work
like that, and both e_cal_get_object and e_cal_get_objects_for_uid deal
correctly with either VEVENT/VTODO or VCALENDAR objects returned by the
backend.

I haven't done too much testing, just confirmed it's been working for me
for a couple days now, so let me know of any problem you might find,
specially on GW/Exchange backends.

I don't know how to fix it for 2.0.x though, because there we can't
break the API, so the need for calling get_object_list is still there.
Any ideas?
-- 
Rodrigo Moya <rodrigo novell com>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]