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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user