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:
Paul Beckingham 2011-08-14 12:00:10 -04:00
parent 9a862bc75a
commit b1ad00313f
2 changed files with 12 additions and 19 deletions

View file

@ -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;