Open
Description
In an application I am working on, cif_loop_add_packet
has become a bottleneck on loading large CIF files. Real world examples include large protein complices such as RNA polymerase II.
The root of this problem seems to be that cif_api
inserts packets into SQLite one at a time with cif_loop_add_packet
. Profiling suggests that the issue is the accumulation of SQL overhead. To give some concrete numbers: for a 2.3MB CIF file containing a single entry, with a loop containing ~34,000 packets, on an Apple A9X ARM64 SOC, parsing takes up ~44s, of which 89% is spent in sqlite3_step
.
I suspect this may be related to how the build configuration of iOS' system sqlite3, in particular journaling and caching configuration.