ivanov / attending

BSD 3-Clause "New" or "Revised" License
2 stars 3 forks source link

Library should cache directories index #9

Open ivanov opened 5 years ago

ivanov commented 5 years ago

Currently, in the file attending/library.py there is a Library class whose __init__ function walks .attending/ to find installed modules. That's fine for now, and will be when there are just a few modules, but we might want to speed that up for when there are a bunch of docs installed. Especially when there are multiple versions for most modules.

The added benefit will be the ability to know all of the installed versions without having to recursively walk ~/.attending to find all the things. The added complexity, however, will be the possibility of corrupting this index with multiple concurrent runs of attending, be they via API or via command line tool.

ivanov commented 5 years ago

one way to do this might be to use a sqlite database, so you get the locking for "free".