dashing icon indicating copy to clipboard operation
dashing copied to clipboard

Improve SQLite and map performance

Open BryceStevenWilley opened this issue 2 years ago • 0 comments

Not sure if significant performance improvements are considered under maintenance. If not, feel free to close.

Inspired by #59, with profiling, was able to improve two points of performance:

  • use SQLite transactions to greatly speedup inserts
  • looking into the entities map. For most characters, we don't need to check the map, so added a quick comparison operator to improve that

On my general workload (generating a docset with 348 entities) on my machine, this improves things from taking 35 seconds to things take 2 seconds. Most of the timesave was from the SQLite improvements.

Realizing that most of the changed lines here were organizing the entities map, which didn't make a difference except for in making the smallest rune clearer. Happy to revert that if desired.

BryceStevenWilley avatar Oct 01 '22 03:10 BryceStevenWilley