Reduce the amount of copies necessary for TDB2::gc() by moving the GC
processing to the Task object source - TF2::load_tasks().
This entangles TDB2 and TF2 more than previously, but leads to huge
performance benefits:
- "next" performance test down 21%
- "list" performance test down 11%
- "all" performance test down 4%
- "export" performance test down 9%
The "gc" measurement is down 96% for all performance tests. This is a
result of moving the actual processing into TF2::load_gc() and not
measuring the time taken by that function as "gc" time.
- Leads to 1-3% improvement across all performance tests.
- _I2U could very likely be further optimized by using a sparse vector,
or handling the edge cases of this approach ourselves.
- Improves "task import" performance test on test machine further from
13s to 1.9s.
- Active only during "task import". Might be worth using during other
mass lookups like "task sync", or could even be a good default.
- Removed the ability for hooks to add tasks, or modify tasks that are outside
the context of the current event. This makes hooks a local mechanism that
operates only on local changes. Modifications/additions coming in via sync
command are not processed by hooks.
- Added an option to bypass backlog recording to TDB2::add and TDB2::modify.
This is required when handling backlog data, to prevent perpetual syncing.
- Fixed bug #1022, where dependencies were note released when a blocking task
was completed (thanks to Arkady Grudzinsky).
- The Task object now caches ::is_blocked and ::is_blocking Booleans that are
determined on pending.data load.
- Simplified and sped up color rule processing using cached values, reducing
the number of map lookups, and removed loop invariants when the rules are
not defined.
- Simplified urgency calculations given the cached values for blocked/blocking.
- On load, pending.data is scanned for accurate blocked/blocking status
determination.
- Obsoleted and removed complex single-task dependency calculations.
- Sped up 'nag' processing by using cached values..
- Modified the 'show' command to consider color.blocking to be valid.
- Added default config value for color.blocking, and included it in the
precedence list ahead of blocked, as it is more important.
- Updated taskrc.5 man page to include the new color.blocking rule, and its
place in the rule precedence.
- Removed backlog file processing, which slows down processing. When
2.1 has taskd support, the backlog will be cleared, but until then there
is no point in accumulating transactions.
- Fixed validation bug whereby recurring child tasks inherited the
parent status ("recurring") instead of the expected "pending".
- Modified 'add' command to code duplicated in Task::validate.
- Cleaned up associated bug.period.t unit test.
- Stubbed the undo implementation in TB2::revert (undo as a name is
already taken), and in the process lose the capability.
- Add detection of <modifications> when running the 'undo' command
and generate an error.
- Full implementation of TDB2::add, which includes pending/completed, undo
and backlog.
- Removed obsolete TF2::commitUndo, which is no longer necessary.
- Added File::truncate method, to allow a TDB2 shortcut.
- Added a diagnostic dump of the TDB2 state in debug mode.
- Added a call to TDB2::dump at the start of TDB2::commit.
- Removed unnecessary calls to TDB2::dump.