Commit graph

171 commits

Author SHA1 Message Date
Paul Beckingham
88516acdaa Copyright update 2018-05-13 20:50:26 -04:00
Paul Beckingham
4c8456a86d TDB2: Migrated from ISO8601d to Datetime 2018-05-13 20:43:17 -04:00
Paul Beckingham
6c90de1974 TDB2: Migrated from ViewText to Table 2018-05-13 20:42:00 -04:00
Paul Beckingham
8a43f4902d libhsared: migrating from local to libshared 2018-05-13 20:26:34 -04:00
Paul Beckingham
80ea2bb51d TDB2: Made sure file exists before checking readability 2018-05-13 20:22:04 -04:00
Paul Beckingham
570cd3d810 Context: Eliminated load timer 2018-05-13 20:21:36 -04:00
Paul Beckingham
ff36a87551 Context: Eliminated commit timer 2018-05-13 20:20:35 -04:00
Paul Beckingham
89b8c9f198 Context: Eliminated gc timer 2018-05-13 20:20:06 -04:00
Paul Beckingham
ced7490df6 TDB2: Migrated to libshared Timer 2018-05-13 20:19:22 -04:00
Paul Beckingham
814d7d69fa Cleanup: Don't use string literals when character literals are needed 2018-05-13 20:14:11 -04:00
Tomas Babej
181f098958 TDB2: Fix wrong comment 2018-05-13 19:24:32 -04:00
Tomas Babej
f10a3d6232 TDB2: Add capability to purge tasks out of data files 2018-05-13 19:20:42 -04:00
Paul Beckingham
88ed4d0035 TDB2: Removed obsolete method 2016-01-09 22:33:06 -05:00
Paul Beckingham
641d232dea Copyright: Updated to 2016 2015-12-31 15:06:43 -05:00
Wilhelm Schuermann
ad81810fd3 FS: Fix performance on high latency systems
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.
2015-11-11 08:48:51 +01:00
Wilhelm Schuermann
4424c5e450 TDB2: Further gc() cleanup 2015-11-10 17:10:03 +01:00
Wilhelm Schuermann
5ac1b1c6dd TDB2: Remove unnecessary code
- ID assignment is now handled in TF2::load_task(), the removed code
  duplicated that effort.  Barely noticeable performance impact.
2015-11-10 16:39:37 +01:00
Wilhelm Schuermann
6dc30a9a1a TDB2: Move gc() processing to TF2::load_tasks()
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.
2015-11-09 19:20:57 +01:00
Wilhelm Schuermann
8f8ad813cd Task: Remove std::map inheritance, clean up interface
- Make the Task object's interface more explicit by removing the
  std::map inheritance.
- Using this more explicit interface, remove unneeded ctors in order to
  allow the compiler to "Do The Right Thing"(tm).
  This leads to a performance improvement of 12% in the "add"
  performance test, and 7% for "import".
2015-11-04 20:33:52 +01:00
Paul Beckingham
d23d0fafb7 Revert "TDB2: Converted from strtoul to std::stoul"
This reverts commit bdfd22ad88.
2015-11-02 18:41:57 -05:00
Paul Beckingham
bdfd22ad88 TDB2: Converted from strtoul to std::stoul 2015-11-01 21:31:10 -05:00
Paul Beckingham
5c8b7148b4 Task: Moved include to top of list, per flint++ recommendation 2015-11-01 19:59:10 -05:00
Tomas Babej
22368b9a40 Revive TDB2::has and TF2::has methods
This reverts commit fa920f02aa. Methods
found their usage after all.
2015-10-29 20:51:45 -04:00
Paul Beckingham
fa920f02aa TDB2: Removed unused ::has methods 2015-10-28 12:16:46 -04:00
Paul Beckingham
a82558064b Cleanup: Prep for '-Wextra' 2015-10-16 16:27:05 -04:00
Paul Beckingham
fb280edbc2 TND2: Migrated from Date to ISO8601d 2015-10-03 15:27:23 -04:00
Paul Beckingham
e2f504e686 Context: No longer calls Context methods while dtor is running. 2015-09-25 07:57:43 -04:00
Wilhelm Schuermann
4fb9307be5 TDB2: Improve TF2::get(uuid, task) performance
- 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.
2015-09-22 18:32:03 +02:00
Tomas Babej
ab40fae67e TDB2: Only ever update task if it differs from original 2015-09-05 17:20:20 -04:00
Paul Beckingham
ada6c24789 Virtual Tag: Undocumented, experimental support for 'LATEST' 2015-08-31 12:59:44 -04:00
Paul Beckingham
b1839adf97 TW-1664: Notify of waiting→pending promotion
- Thanks to Daniel Shahaf.
2015-08-23 16:59:22 -04:00
Paul Beckingham
2a621a4367 TW-1636: UUID with numeric-only first segment is not parsed properly
- Switched Nibbler::getUUID to Nibbler::getPartialUUID, which caused partial
  UUID mathcing to fail sometimes.
- Changed precedence to search for UUID before ID, which solves the numeric
  UUID problem.
2015-08-08 00:49:54 -04:00
Paul Beckingham
78170e0fd4 Signal: Removed useless attempt to trap SIGKILL 2015-08-04 22:31:01 -04:00
Paul Beckingham
758df84539 Context: Now obeys command DNA
- Applying a context filter is now performed only when a command requests it.
2015-08-02 10:08:04 -04:00
Wilhelm Schuermann
e95167a984 Plumbing: Use variadic templates for format()
- Use variadic templates, with a slight twist for properly supporting
  Taskwarrior's l10n strings.
- Adjust code that relied on implicit type conversion which led to
  problems with template instantiation.
- Move some functionality out of format() in order to keep it generic.
2015-06-07 20:54:02 +02:00
Paul Beckingham
e8d04bdce6 C++11: N1984 auto 2015-05-24 13:36:26 -04:00
Paul Beckingham
e74c6963a9 C++11: Cleaned up program framework with range-based for 2015-05-11 17:50:53 -04:00
Paul Beckingham
c346cf9395 Portability: Use fcntl instead of flock
- POSIX file locking mechanism, eliminating platform-specific code.
2015-05-02 11:47:39 -04:00
Wilhelm Schuermann
c830b4b669 TW-1287: default.* values applied to synced tasks
- Tasks that arrive through "task sync" no longer have defaults applied
  to them.
2015-04-02 13:39:20 +02:00
Wilhelm Schuermann
7a64c19641 Resolve most compiler warnings 2015-03-29 22:05:38 +02:00
Wilhelm Schuermann
9e6c6ecb93 TW-1583: Invalid ID displayed after done/delete
- Fix completed/deleted tasks getting an ID when GC is going to be run,
  previously resulting in invalid IDs being displayed in reports that
  show non-pending tasks.

A side effect of this fix is that it is sometimes not possible to
filter by ID when running a report right after calling done/delete.
This problem existed before; this change makes it happen on the first
report instead of the second, so it is more consistently broken.
Commands that modify tasks are not affected, making this an annoying
yet harmless defect.
2015-03-28 10:36:58 +01:00
Wilhelm Schuermann
d2e6c90446 TW-1581: Wrong urgency after done/delete command
- TDB2::dependency_scan() is run before GC, so we need to check both
  tasks in a dependency chain for their status before setting the
  blocking/blocked flag to true.
2015-03-26 18:43:58 +01:00
Wilhelm Schuermann
4f75652ccb TW-1580: "modified" attribute not updated
- Make all local modifications update the "modified" attribute.
- As per design, the user cannot overwrite this attribute; neither
  can hooks.
2015-03-23 15:55:47 +01:00
Paul Beckingham
96185cbd61 Merge branch '2.4.2' of ssh://git.tasktools.org/tm/task into 2.4.2 2015-03-02 16:17:09 -05:00
Paul Beckingham
7665d13d42 Duration
- Removed legacy duration value mapping, which causes much performance
  degradation.
2015-03-02 16:16:39 -05:00
Paul Beckingham
01feec568b Merge branch '2.4.2' of ssh://git.tasktools.org/tm/task into 2.4.2 2015-03-02 09:35:45 -05:00
Paul Beckingham
104aeb3905 TDB2
- Commented and reorganized for threading.
2015-03-02 09:33:57 -05:00
Tomas Babej
f0cc0151b7 TDB2: Explicitly mark updates done as addition to optimize performance
We are able to avoid loading the completed.data in certain scenarios.
2015-02-28 16:54:09 -05:00
Paul Beckingham
1cfdfbae52 Hooks
- 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.
2015-01-31 17:47:58 -05:00
Paul Beckingham
547d9edb55 TW-1484
- TW-1484 The 'history' and 'ghistory' reports do not obey rc.color.label.
2015-01-10 15:49:42 -05:00