suchnsuch / Tangent

The publicly-available modules of the Tangent project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cache the Index & asynchronously confirm to speed up initial boot times.

taylorhadden opened this issue · comments

Tangent currently indexes the entire workspace from scratch on every startup. For large workspaces, this creates a significant problem. Users are reporting start times in the handfuls of minutes.

The vast majority of the time, the index will not have changed. The index needs to be saved to disk on exit and restored on startup.

We can probably run with the cold index directly most of the time and confirm in the background. Just need to rip through all files and check their modified timestamp by the one saved in the index.

Index data should probably be split into two types:

  1. The data that is derived from the contents of a file.
  2. Additional metadata saved by the user.

Derived data doesn't need to be stored in, say, git, but users may want their additional metadata.

This is now working, greatly improving boot times when a cache is present. I also significantly improved the performance resolving links in general, so even a fresh boot should be faster.