Add function to add items in bulk.
This optimizes for large todo files (or large archive files). For each added todo item, _update_parent_cache was called N times, which in turn calls todo_by_hash which also does N iterations, where N is the number of todos added at that point. This doesn't scale with a couple of hundreds of todo items. Instead, introduce a list variant of add_todo which does the cache update only once.
Showing
Please register or sign in to comment