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

Speed #132

Closed
v1gnesh opened this issue Sep 10, 2024 · 8 comments · Fixed by #133
Closed

Speed #132

v1gnesh opened this issue Sep 10, 2024 · 8 comments · Fixed by #133
Assignees
Labels
enhancement New feature or request

Comments

@v1gnesh
Copy link

v1gnesh commented Sep 10, 2024

When switching between screens quickly, I find that I get Keylock = 1 more often than I'd like.
Will it help to switch from the default python asyncio event loop to https://github.com/MagicStack/uvloop ?
If it improves the situation, it's fine if it isn't merged into the main branch, but is instead available as a flavour.
I suppose keeping dependencies to a minimum is a reason to not merge it into main.

@najohnsn
Copy link
Member

I suspect this is related to #94. Unless you have 100 or more tnz sessions at the same time, I am very skeptical that the asyncio package would make a difference.

I suspect you may be used to another emulator that buffers keyboard input while the keyboard is locked waiting for a response from the server. In which case, having zti do that kind of buffering would be the solution.

Do you agree with that, or maybe something else is going on?

@v1gnesh
Copy link
Author

v1gnesh commented Sep 11, 2024

Yes that is probably it. Just wondering if it's worth checking with uvloop as it's easier to test compared to implementing input buffering.
I'm not chaining commands like in that post though; just pressing F9 quickly in succession to go between screens (as one example).

@najohnsn
Copy link
Member

Yeah, #94 wasn't the best reference. I know that buffering has been brought up before though. but I guess there is not an issue for it. I'm going to consider this an issue for it.

@najohnsn najohnsn self-assigned this Sep 13, 2024
@najohnsn najohnsn added the enhancement New feature or request label Sep 13, 2024
@najohnsn
Copy link
Member

@v1gnesh, if you're willing.. I have a draft PR that I believe will address your issue. To install:

pip install git+https://github.com/IBM/tnz@keylock-buffer

@v1gnesh
Copy link
Author

v1gnesh commented Sep 14, 2024

@najohnsn Thank you. I don't know yet if a repository manager is capable of pulling PyPI stuff for pip via a git source. I'll try & report back.

@v1gnesh
Copy link
Author

v1gnesh commented Sep 18, 2024

@najohnsn I tried the above command to install; looks like I can only install from a package (it can be obtained via a repository manager).

@najohnsn
Copy link
Member

Interesting. I'm not familiar with your "repository manager" environment. Maybe you could download it from here?
https://github.com/IBM/tnz/archive/refs/heads/keylock-buffer.zip
Unzip it. Change directories to the parent of the tnz directory in the unzipped content. Then

python -m tnz.zti

I believe that Python will pick up the tnz module from that tnz directory instead of the installed tnz package.

@v1gnesh
Copy link
Author

v1gnesh commented Sep 19, 2024

It's things like Artifactory JFrog or Nexus Repository.
They proxy packages from PyPI, but aren't capable of getting content from git directly.
Direct download from GH is not an option in some/many sites ... or is at least frowned upon.

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

Successfully merging a pull request may close this issue.

2 participants