mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-01 18:27:20 +02:00
TDB2 & CmdCustom
- Converted CmdCustom to use TDB2, which means that for the first time, 2.0 is now optimizing data load based on filter characteristics. This means that "task list" and "task next" etc are now *fast*. - Improved diagnostics for TDB2, for debugging.
This commit is contained in:
parent
9a862bc75a
commit
b1ad00313f
2 changed files with 12 additions and 19 deletions
|
@ -92,17 +92,10 @@ int CmdCustom::execute (std::string& output)
|
|||
context.a3.dump ("CmdCustom::execute");
|
||||
|
||||
// Load the data.
|
||||
// TODO Replace with TDB2.
|
||||
std::vector <Task> tasks;
|
||||
context.tdb.lock (context.config.getBoolean ("locking"));
|
||||
handleRecurrence ();
|
||||
context.tdb.load (tasks);
|
||||
context.tdb.commit ();
|
||||
context.tdb.unlock ();
|
||||
|
||||
// Apply filter.
|
||||
context.tdb2.commit ();
|
||||
std::vector <Task> filtered;
|
||||
filter (tasks, filtered);
|
||||
filter (filtered);
|
||||
|
||||
// Sort the tasks.
|
||||
std::vector <int> sequence;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue