Start-up performance very bad for large Google (EDS) contact lists
Submitted by Travis Reitter
Assigned to fol..@..e.bugs
Created attachment 230547 Callgrind run on folks-inspect with an EDS/Google account containing 6,000 contacts.
I've heard a few people complain poor Folks performance for a while, but hadn't been able to reproduce it myself for a while.
There is a huge set-up time (for IndividualAggregator.prepare(), I assume) for large contact lists. It takes folks-inspect about 2 minutes to settle with a single 6,000-contact Google account (set up in Evolution Contacts). The entire time, folks-inspect burns 100% CPU.
There's a lot of investigation still to do. Unfortunately, callgrind doesn't yield any easy answers. Most of the actual time is constructing and destructing GObjects (at least in large part, Gee objects), emitting and handling signals. But in the recorded run, g_object_constructor is called 11.9 million (!) times. So, there's got to be a better way to re-use our objects (especially if it turns out we're creating and destroying Gee objects unnecessary). This run took 56 minutes within callgrind, so I'm going to have to create a scaled-down test account while whittling down this excess work.
There is a slight hint in the callgrind output that a lot of this comes down to the actual aggregation/linking, which probably shouldn't be a surprise.
Attachment 230547, "Callgrind run on folks-inspect with an EDS/Google account containing 6,000 contacts.":
Version: git master