d12frosted / vulpea

A collection of functions for note taking based on `org` and `org-roam`.
GNU General Public License v3.0
237 stars 12 forks source link

(feat) actually improve performance of specialized queries #115

Closed d12frosted closed 2 years ago

d12frosted commented 2 years ago

And again I fall into trap of checking performance of functions with empty data set. I used notes that I generated during org-roam v1 and they had invalid format of tags, meaning that there were 0 notes in the resulting data set, meaning that I didn't really test for notes retrieval.

Now that is fixed by the following steps.

  1. Test set was generated again with org-roam v2 and it contains 9554 notes with links, properties and proper tags.

  2. To make sure that the data set is not malformed, there is a special check that result of benchmarked function is not empty.

  3. Last, but the thing that actually fix performance - bulk retrieve all matched notes instead of using many calls to vulpea-db-get-by-id. This means that we have one more HUGE and FRIGHTENING SQL query, but seems like performance is much better. See updated README file.

d12frosted commented 2 years ago

README will be updated after CI is green :) I would rather include benchmark results from CI than from my laptop.