Caching for get_person_from_handle

The gramplet I’m currently working on goes through a lot of people, some multiple times. So to improve performance, I’m thinking of adding a cache for the people processed by the gramplet. Just wondering if get_person_from_handle() already caches results.

Cheers! Hans

You would need to use the cache proxy module gen/proxy/ to get a cache of your data. As with all caches it works great if access are closely spaced in time/number of accesses; but if you process all people serially, then process them again, it probably won’t help. at least for large dbs. See plugins/textreport/ line 137 for an example of usage.

Thanks, Paul! That looks cool!

In my gramplet, I’m now going with my own cache since I also want to keep track of parent handles for each person I process.

Cheers! Hans

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.