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

Slow reaction when start lf? #1720

Open
og900aero opened this issue May 21, 2024 · 2 comments
Open

Slow reaction when start lf? #1720

og900aero opened this issue May 21, 2024 · 2 comments

Comments

@og900aero
Copy link

Hello. I have a problem. When I open lf, and immediately press gt (configured map gt $lf -remote "send $id cd /home/Data/.Trash"), then no jump to the properly directory.
I have to wait a certain time after starting lf, and only then can I press the gt keyboard so that it actually jumps to the right place. The log shows that the last l_oading files_ section only appear after almost 1 second. If I press the button required to jump before this appears, it does not execute, the window just flashes. If after that, it will jump to the right place.

2024/05/21 14:55:50 hi!
2024/05/21 14:55:50 reading file: /home/shyciii/.config/lf/colors
2024/05/21 14:55:50 reading file: /home/shyciii/.config/lf/icons
2024/05/21 14:55:50 loading files: []
2024/05/21 14:55:50 reading file: /home/shyciii/.config/lf/lfrc
2024/05/21 14:55:50 connecting server: dial unix /run/user/1000/lf.shyciii.sock: connect: no such file or directory
2024/05/21 14:55:50 shell: ${{ lf -remote "send $id cd /home/Data/.Trash" }} -- []
2024/05/21 14:55:51 loading files: []

When press before and after loading files section:

2024/05/21 15:07:54 hi!
2024/05/21 15:07:54 reading file: /home/shyciii/.config/lf/colors
2024/05/21 15:07:54 reading file: /home/shyciii/.config/lf/icons
2024/05/21 15:07:54 loading files: []
2024/05/21 15:07:54 reading file: /home/shyciii/.config/lf/lfrc
2024/05/21 15:07:54 connecting server: dial unix /run/user/1000/lf.shyciii.sock: connect: no such file or directory
2024/05/21 15:07:55 shell: ${{ lf -remote "send $id cd /home/Data/.Trash" }} -- []
2024/05/21 15:07:55 loading files: []
2024/05/21 15:07:56 shell: ${{ lf -remote "send $id cd /home/Data/.Trash" }} -- []
2024/05/21 15:07:56 recv: cd /home/Data/.Trash

When 0 config (only go to directory maps):

2024/05/21 14:54:50 hi!
2024/05/21 14:54:50 reading file: /home/shyciii/.config/lf/colors
2024/05/21 14:54:50 reading file: /home/shyciii/.config/lf/icons
2024/05/21 14:54:50 loading files: []
2024/05/21 14:54:50 reading file: /home/shyciii/.config/lf/lfrc
2024/05/21 14:54:50 loading files: []
2024/05/21 14:54:50 shell: ${{ lf -remote "send $id cd /home/Data/.Trash" }} -- []
2024/05/21 14:54:50 recv: cd /home/Data/.Trash

In this case, it will appear quickly. That way there is no delay. My lfrc file's size is 14kb and 492 rows.
What could be causing this slowdown? Or is it not possible to customize the lf that much anymore, because then it can slow down?

@DusanLesan
Copy link

I do not know why that delay exists before doing loading files, but why are you using remote to cd? That sounds like it could cause issues if the client instance does not start observing remote commands in time or the time for reacting to them is simply too slow. Can you try to use map gt cd /home/Data/.Trash

@og900aero
Copy link
Author

I do not know why that delay exists before doing loading files, but why are you using remote to cd? That sounds like it could cause issues if the client instance does not start observing remote commands in time or the time for reacting to them is simply too slow. Can you try to use map gt cd /home/Data/.Trash

Ooops. I forgot, it have built-in cd command. I have replaced all my jumps, and now jump immediatley, but it would to somehow find out what is causing the delay to execute the lf -remote command. Isn't it possible to somehow set deeper logging so that the problem can be debugged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants