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

Taskwarrior TUI exceptionally slow when $TASK_DATA_HOME is not set #534

Open
martin-braun opened this issue Jan 16, 2024 · 10 comments
Open
Labels
bug Something isn't working

Comments

@martin-braun
Copy link

Describe the bug

task can handle TASK_DATA_HOME being unset, it just defaults to $HOME/.task at runtime. taskwarrior-tui has problems with this, the application gets exceptionally slow.

To Reproduce

Use defaults everywhere (default .taskrc, no modified .zshrc or .bashrc) and run taskwarrior-tui.

MacBook Pro 16" 2019 T2 macOS Ventura 13.5.2 (22G91)

@martin-braun martin-braun added the bug Something isn't working label Jan 16, 2024
@kdheepak
Copy link
Owner

Hmm that's unusual since TASK_DATA_HOME is not used at all by taskwarrior-tui.

Can you elaborate on what you mean by it is exceptionally slow? Which version of taskwarrior-tui are you using?

@martin-braun
Copy link
Author

@kdheepak taskwarrior-tui 0.25.4

It might be a cascading issue. Exceptionally slow in terms of rendering. I would hit j and k and having to wait seconds until the marker moves. Or pressing a and starting typing and everything would have a huge delay, including letters appearing. C-c or q would also lag. Actions get stuck in a chain, so the more you input, the longer you have to wait.

With the TASK_DATA_HOME in .zshrc everything gets snappy again. I have no other explanation for it, other than that I have tested this to be able to come to this conclusion. Please try to replicate.

@kdheepak
Copy link
Owner

Interesting. Thanks for reporting! I don't have TASK_DATA_HOME set and I don't see any lag. I also set it and still didn't see lag. Do you have a lot of tasks? I could imagine that being a problem.

I have some ideas for generally improving the snappiness, but that will only happen as part of the refactor, tracking issue here: #349. I'll look into this specifically as I'm working on that.

@martin-braun
Copy link
Author

martin-braun commented Jan 16, 2024

@kdheepak I have only 30ish tasks. I also tested after removing my task database. It was faster, but still significantly slower than usual.

If you cannot replicate this on a Mac, then I guess it's something on my setup interfering, but I have no idea why and how. I'm in the process of overworking my dot files, cleaning things up and re-organizing.

I removed TASK_DATA_HOME and things went downhill. I was testing in multiple terminals, with and without tmux, no other TASK_DATA_HOME in my dot files somewhere.

Feel free to close this issue if nobody else can confirm it and you can't figure it out either. I got around this problem by specifying TASK_DATA_HOME to its default value $HOME/.task again and I won't touch this anymore, so I can live in peace.

I just felt the need to report it anyways. I also want to use this opportunity to thank you for taskwarrior-tui, it's great. :)

@kdheepak
Copy link
Owner

Thanks for reporting! I'll leave the issue open so that I can investigate later when I get the chance! Hope you enjoy using taskwarrior-tui. Feel free to report bugs / make feature requests if you come across anything!

@GregPK
Copy link

GregPK commented Jan 29, 2024

I did a kind of drive-by reverse reproduce test.

  • I was previously at default values (ie. no TASKRC or TASK_DATA_HOME).
  • I moved my data by first setting TASK_DATA_HOME and I saw no change in performance (ie. no speed up).
  • Then I set TASKRC (and moved it) with the data directory changed in the file. Also no changes in performance.

So I was NOT able to reproduce on

taskwarrior-tui 0.25.4
task 2.6.2
uname: Linux 6.7.0-arch3-1 #1 SMP PREEMPT_DYNAMIC Sat, 13 Jan 2024 14:37:14 +0000 x86_64 GNU/Linux

@kdheepak
Copy link
Owner

Thanks for checking! I also checked locally and didn't see any issue on my end, but clearly the @martin-braun is experiencing something.

If I have to guess, I bet it is something to with the version of taskwarrior and possibly how taskwarrior-tui is reading task details? Anyway, I have ideas for how to improve this so I'll revisit this during the (long pending) rewrite.

@martin-braun
Copy link
Author

martin-braun commented Jan 30, 2024

If I have to guess, I bet it is something to with the version of taskwarrior and possibly how taskwarrior-tui is reading task details?

Just for the record:

~ > command task --version
2.6.2
~ > command taskwarrior-tui --version
taskwarrior-tui 0.25.4
~ > uname -a
Darwin mbpt2-macos.local 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul  5 22:21:56 PDT 2023; root:xnu-8796.141.3~6/RELEASE_X86_64 x86_64

@kdheepak
Copy link
Owner

Thanks for sharing the versions!

@DC-Melo
Copy link

DC-Melo commented Mar 21, 2024

yes

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