Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commonly known performance gotchas? #581

Open
ThomasGHenry opened this issue May 23, 2024 · 6 comments
Open

Commonly known performance gotchas? #581

ThomasGHenry opened this issue May 23, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@ThomasGHenry
Copy link

Hiya!

Thanks for this! In my first 3~4 days of using it, I was FLYING. It was awesome. Now I'm about 700 tasks in on day 10 or so, and it's unusably slow, even to the point of impacting the rest of my system (MacOS - Sonoma 14.4.1). I just open it and have to kill it. Fan turns on system gets hot, all that good stuff.

Has anyone seen this? Where should I look first? Also, task and tasksh and other taskwarrior tools work fine.

I don't think it's a memory leak. I think it's working hard at something. I do have a hook on modify. Is there some automatic modification is does to all the tasks on coming up? I just thought of that, so I'll disable the hook and report back while I await your suggestions.

Thanks!

@ThomasGHenry ThomasGHenry added the bug Something isn't working label May 23, 2024
@kdheepak
Copy link
Owner

Can you update the tick rate? This is the default:

uda.taskwarrior-tui.tick-rate=250

The number is in milliseconds, so increasing it to 1000 or 4000 should only cause updates once every 1 or 4 seconds.

I'd also look at the debug log output. Set the following environment variable:

export TASKWARRIOR_TUI_LOG_LEVEL=debug

And then check for a log file in the XDG data folder: https://docs.rs/directories/5.0.1/directories/struct.ProjectDirs.html#method.data_dir

That should give you some insight into what is going on.

@kdheepak
Copy link
Owner

Possibly related to #545

@RedEtherbloom
Copy link
Collaborator

RedEtherbloom commented May 25, 2024

Have you modified 'task-detail-prefetch' in taskrc?
Does the lag improve if you close the detail panel, after the startup finished?
(The update_task_details method is a big performance bottleneck which I'm rewriting.
It was a bottleneck on my X230 during startup and resulted in similar syptoms).

Have you modified any other any other settings?

To my understanding taskwarrior-tui does not modify tasks on startup.
Taskchampion(taskwarriors backend) modifies it's urgency value on certain read operations, many of which are run during startup though.
I'm not sure if this would trigger the on-modify hook though, the comment in the placeholder file would suggest no.

The on-modify event is triggered separately for each task modified. This hook script can accept/reject the modification. Processing will continue.

@ThomasGHenry
Copy link
Author

I set these and we're cruisin' again. Thanks, all!

uda.taskwarrior-tui.tick-rate=4000
uda.taskwarrior-tui.task-detail-prefetch=false

By the way, it's probably not my hook because the hook logs and it's not logging.

@pchr8
Copy link

pchr8 commented Sep 8, 2024

+1 data point on the issue: I have 6k tasks in taskwarrior (though only <70 pending ones), and taskwarrior-tui was unusable with updates happening every 4+ seconds or so

Using the lines pasted above by @ThomasGHenry solved this! I can finally try taskwarrior-tui out :)

@RedEtherbloom
Copy link
Collaborator

So I'm suspecting it may actually be the prefetch that is making taskwarrior-tui lag, as I have similar experiences with ~400 tasks.
I'll try to find the energy to finish my fix, can't guarantee when it will drop due to depression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants