kaykay-dv / pocketsearch

A simple full-text search library for Python using SQLite and its FTS5 extension
https://pocketsearch.readthedocs.io/en/latest/
MIT License
1 stars 0 forks source link

Speed up index process #17

Closed kaykay-dv closed 1 year ago

kaykay-dv commented 1 year ago

Speed up can be improved by "pooling" commits and performing the commit after a certain buffer size is reached.

kaykay-dv commented 1 year ago

Has been fixed by providing the write_buffer_size option in the PocketSearch constructor. Its default is 1, meaning the commit is done after each insert/update/delete. It can be increased to e.g. 1500, so the commit is done, once 1500 changes have been made.