Instead of checking for Darwin, check whether REG_ENHANCED is defined,
since that's the only difference between the two options.
This fixes compiling on older versions of OS X, where REG_ENHANCED is
not defined.
More efficient string concatenation combined with a lookup table for
JSON encodings leads to 2% improvement for "export" performance test,
3% improvement for "import" performance test.
- Thanks to David Patrick.
- The 'rc:' argument now means 'use all defaults', which assumes
'data.location=~/.task', so this will not work for anyone using a different
location.
- While duration formats are still not configurable, the break points for
formatting units is shifted to be a little more predictable.
- Thanks to Black Ops testing.
- The 'age' column regained the ability to show negative durations.
- The 'countdown' and 'remaining' continue to show only positive values, by
design.
- Thanks to Jeremy John Reeder.
- Thanks to Roman Golovin.
- Calls like 'context.columns[name]' autovivify the key 'name' with a default
ctor value, which ends up polluting the context.columns map with every unique
attribute name, which is a lot of 'annotation_nnnnnnnnnn' attributes.
Improves "load" time for all performance tests that load data by ~20%.
- "next" down 15% total
- "list" down 7% total
- "all" down 3% total
- "add" down 15% total
- "export" down 8% total
- "import" down 6% total
fseek() in File::append() was invalidating the file buffer for each call
to append(). Better handling improves "import" performance test by 9%,
45% in "commit", on a system with a spinning disk.
This performance problem affects all operations where
{pending,completed}.data are rewritten. During normal operation a
garbage collection can be enough to trigger it. On storage with high
latency, e.g. networked, this previously took 20 seconds and more.
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.