Resetting statistics for a ProfileSet is a time-consuming operation. The changes Nick and I made last summer helped a lot, but there's still still significant I/O of opening and closing databases, and I/O is slow. Resetting statistics consumes at least a few seconds.
On Friday, I discovered that the annotation engine code was resetting statistics every time it created a filter, instead of doing it only once--and an analysis tree will have a few dozen filters.
Today, I started the day by changing that code to reset statistics lazily, so it resets only once. It should speed up the loading phase dramatically.