Skip to content

Improve TUI performance

Max Rossmannek requested to merge tui-performance into master

Fixes #12 (closed)

Before the addition of the curses-based TUI, the command line presented the only means to interact with CoBib. Because of that, every executed command had to read the database in itself.

Now, that multiple commands can be run in succession without restarting the program this caused a huge performance penalty because in most cases (e.g. when listing the entries in the database) the source file does not have to be read in again and again.

This PR fixes the performance issues by centralizing the bibliography data and only reading it in once at the start of the TUI and upon changes of the database through commands like add, edit, delete, etc. The performance gain is very significant!

Merge request reports