taskwarrior-tui icon indicating copy to clipboard operation
taskwarrior-tui copied to clipboard

High harddisk usage if you open more than 1 taskwarrior-tui

Open donob4n opened this issue 1 year ago • 2 comments

I noticed that one idle taskwarrior-tui instance doesn't write anything to the hard disk but opening another produces a fixed write on both process.

A fast look into it points that '/.local/share/taskwarrior-tui/taskwarrior-tui.log' starts to write many refresh. Like 1 per second.

Maybe they mutually force the other to refresh.

donob4n avatar Mar 08 '25 09:03 donob4n

I tried commenting this line https://github.com/kdheepak/taskwarrior-tui/blob/54b06cd20e85baf5a6e4550048c0cd18f2c26ace/src/app.rs#L393 and the problem dissapears without any noticable drawback.

Not sure what triggers that Tick events...

donob4n avatar Mar 16 '25 22:03 donob4n

Thanks for making the issue.

I think what might be happening is that both instances of the tui are checking for the last time the taskwarrior database is updated:

https://github.com/kdheepak/taskwarrior-tui/blob/54b06cd20e85baf5a6e4550048c0cd18f2c26ace/src/app.rs#L1288

And since they are both updating the files they are both updating their last_export time:

https://github.com/kdheepak/taskwarrior-tui/blob/54b06cd20e85baf5a6e4550048c0cd18f2c26ace/src/app.rs#L1311

I'll have to get back on how best to solve this.

kdheepak avatar Mar 17 '25 05:03 kdheepak