HackMake ⌁ Taskwarrior

Go to Reference Index

Wishlist / Backlog

Changelog

2023-10-03

Disabled hooks temporarily to see if I can live without them

  • they aren’t super fast so hold up the tui for noticeable milliseconds
  • task done 12 0.01s user 0.01s system 55% cpu 0.031 total without hooks
  • default-time = 176824
  • relative-recur = 236735
  • ~300-500ms total with scripts
  • Even a noop python script takes 0.340628 sec

First thing I notice when hooks are disabled is that tasks are set due for 00:00:00 the day they are due. I forgot that and thought the default was 23:59:59. This is why I added this hook in the first place.

I’m going to spend some time rewriting the hook in bash to see if it’s any faster.

2023-10-04

Made some time to figure this out and have a bash-based hook that executes in 52571 (instead of the python hook of 176824) which is a 3.3x performance improvement.

I think I can live without the relative recurring hook but I’ll wait a while and see if it becomes an issue when some of my standard recurring tasks come back up next month.

2023-10-09

Rethinking a relative recurring hook since a lot of repeating tasks aren’t the standard type and it feels awkward to force it into that.

I think I’ll be able to rewrite the python version in bash to save time. That open design question is whether tp complete the task and create a new one or just reschedule the task instead of completing. Completing and adding is more inline with the task warrior way but leaves more clutter behind. I think I’m in favor of the “complete and add” model.

2023-10-11

Also made some time to try and rewrite a relative-recurring hook in bash. Made good progress then ran into issues with the data writes conflicting. Other scripts wait until the parent PID is done but not having success with that so tried to optimize the JensErat script to save some milliseconds. I think it’s good enough for now and I need to move on.

Found this other bash hook to use for general reference for bash implementation but doesn’t address the issue of data write conflicts:

https://github.com/arcnmx/task-blocks/blob/master/task-blocks

16:31: Ended up figuring this out. If a test requires creating a follow-up, the hook takes 0.165036 sec. If it doesn’t (most tasks), it only takes 0.047576 sec to run.