GothenburgBitFactory / taskwarrior

Taskwarrior - Command line Task Management
https://taskwarrior.org
MIT License
4.34k stars 292 forks source link

mtime of taskchampion.sqlite3 got changed when calling `task list` #3418

Open chenyuntc opened 5 months ago

chenyuntc commented 5 months ago

When I run task list the taskchampion.sqlite3's mtime changed.

This is inconvenience as I use the mtime to sync between workstations.

So is there a way to turn off the changes on the sqlite file when operations has no side-effect (i.e. list, filter)?

LeGuipo commented 5 months ago

I confirm. Every time taskwarrior fetches some data, the file seems updated. I also suspect this is the cause of the noticeable delays for taskwarrior to display results.

djmitche commented 5 months ago

I don't think TW is acutally modifying the data, but it is opening the DB in r/w mode which, from some quick strace analysis, does perform a write of the first block.

So, we should find a way to open the DB in a read-only mode.