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

terminator is slow #426

Closed
ynikitenko opened this issue Apr 16, 2021 · 3 comments
Closed

terminator is slow #426

ynikitenko opened this issue Apr 16, 2021 · 3 comments

Comments

@ynikitenko
Copy link

Describe the bug
Terminator is too slow. I print pretty fast, and I see a delay between my strokes and its output (in bash and in vim).
It doesn't matter if that's an old session, a newly opened window or a new window with terminator -g /dev/null.

In top I can see that when launching terminator it consumes around 33% of my CPU power (I use a laptop, though not very old or powerless), but even after some time it consumes about

8,9 %CPU   6,6 %MEM   0:24.52 terminator

(compare with gnome terminal: 0.7 %CPU, 0.6 %MEM. Absolutely no lag visible).

To Reproduce
I have a background image. I have a config (but as I wrote, it's the same with an empty config).

Expected behavior
Could you please optimize the app or allow users to optimize that switching off some functionality?

Desktop (please complete the following information):

  • Arch Linux.
  • terminator 2.1.1 (but I think that was same for previous versions).

Additional context
This problem seems to be known (see Arch Linux Forum in 2018 (though there was another reason), Stack Overflow in 2019 (though it was only after several days of using terminator), and other links (but not reddit)).

I found the FAQ …write in Python? It’s slow/bloated/bad?. Unfortunately it doesn't seem to explain how one could improve the performance. Honestly, I don't care much about memory consumption. But a visible lag of the output is not something to be unnoticed. If you prefer Python, maybe it could work with PyPy?

@mattrose
Copy link
Member

So, this could be several things.
It could be #284 which is actually a bug in gnome-shell. You didn't say what you were using, so....
It could be your background image. Terminator needs to re-render the bg image every time you type, so that would eat up CPU and RAM.
It could be something else entirely. Terminator is not built to be as fast as possible, but focusses more on features. I have never noticed a lag, even on relatively low-powered, low-RAM systems such as Raspberry Pis, and I would probably track it down if I did.

What version of python are you running? That may be a contributing factor.

@ynikitenko
Copy link
Author

Yes, I'm using gnome shell. gnome-terminal works pretty fast though.

You are right that it was the background image! When I turned it to solid color, or even transparent background, it started to work much faster. This solves the problem, thanks. The CPU % in top also becomes a perfect 0.3.
I didn't think that it re-renders the background image, thanks for the information.

I have Python 3 as python executable. Though I also have python2 and pypy executables. Is it possible to choose a Python version for terminator?

@mattrose
Copy link
Member

Glad that I could solve your problem. You may want to optimize the background image you're using. It shouldn't be taking up that much of your CPU and RAM if it's optimized properly. I never saw that kind of usage when I was using it.

Python3 is the correct executable to use. There are ways to use python with different interpreters, but they're all pretty much un-tested since python2 went EOL.

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