Open sandikata opened 2 years ago
That's even without any tasks on it.
Please capture a terminal recording:
wezterm record
to start a recording session.exit
*** Finished recording to /var/tmp/wezterm-recording-sF6B3u.cast.txt
The file is an asciicast (compatible with https://asciinema.org/) and can also be replayed using wezterm replay
.
The terminal recording allows me to replicate what is being sent to the terminal without requiring me to install the same applications as you and replicate your configuration for everything.
Hello, There's a record.
Hello,
Is there something new ?
Regards.
In the past day or so I pushed a couple of changes that should help with this; can you try the latest nightly build?
wezterm 20221103-195702-40e08faf
If that't the latest commit i am already with it, and there's no difference.
commit 30daed40b3b4e699e86e10875cd83bdc78b5e55d (grafted, HEAD -> main, origin/main, origin/HEAD) Author: Wez Furlong wez@wezfurlong.org Date: Mon Nov 14 23:11:02 2022 -0700
reduce size of BoxedQuad by 2/3
Since we're no longer tied to contiguous Vertex slices, we can
record the Quad data used for HeapQuadAllocator in a smaller structure,
so that's what this does.
It reduces the per-Quad storage from 272 bytes down to 84 bytes,
which helps with overall memory usage: the default cache size is 1024
lines worth of quads, so this can add up to multiple MB of RAM.
refs: https://github.com/wez/wezterm/issues/2626
lines 1-15/15 (END)
from git log, i havent restarted yet wezterm, let me test, and will report.
wezterm -V wezterm 20221114-231102-30daed40
Well, reporting now. No change.
please remove max_fps = 165
from your config
That's the refresh rate of my monitor.
But anyway with or without it cpu load is insane.
I use this to replay your recording with the default settings (modulo, adjusting for your window size):
time wezterm -n --config initial_rows=59 --config initial_cols=254 --config font_size=8 start -- wezterm replay ~/Downloads/wezterm-recording-XeLs27.cast.txt
and the CPU utilization is only ~2%, so we're missing something. Can you try running it the same way and see if the CPU is still high?
https://cloud.aleksandrov-bg.com/s/aRzToTYnPLeztYN
Check on this video record. No matter, it just uses CPU and lagging.
$ time wezterm -n --config initial_rows=59 --config initial_cols=254 --config font_size=13 start -- wezterm replay /tmp/wezterm-recording-XeLs27.cast.txt 18:50:45.864 WARN wezterm_term::terminalstate > unhandled DecPrivateMode SetDecPrivateMode(Unspecified(1015)) 18:51:03.032 WARN wezterm_term::terminalstate > unhandled DecPrivateMode ResetDecPrivateMode(Unspecified(1015)) dhat: Total: 428,926,823 bytes in 1,083,542 blocks dhat: At t-gmax: 56,890,867 bytes in 439,690 blocks dhat: At t-end: 50,277,345 bytes in 424,762 blocks dhat: The data has been saved to dhat-heap.json, and is viewable with dhat/dh_view.html wezterm -n --config initial_rows=59 --config initial_cols=254 --config start 4,30s user 0,10s system 15% cpu 27,674 total
The dhat
output there suggests that wezterm was built with profiling enabled; that increases CPU utilization. Can you build it without that?
Just watch, now it's even worst, cannot switch between tabs.
How are you building wezterm?
https://wezfurlong.org/wezterm/install/source.html
cargo build --release --all-features
Please use cargo build --release
like the docs suggest; turning on all features at once is not recommended!
turning on all features at once is not recommended!
You just did it in your aur PKGBUILD ?
Okay, i will check.
I didn't write that :-/ I'll get it fixed
Maintainer: wez ? Nevermind :)
Let me check with default features.
rosen at aleksandrov in ~
$ time wezterm -n --config initial_rows=59 --config initial_cols=254 --config font_size=13 start -- wezterm replay /tmp/wezterm-recording-XeLs27.cast.txt
19:04:28.149 WARN wezterm_term::terminalstate > unhandled DecPrivateMode SetDecPrivateMode(Unspecified(1015))
19:04:45.323 WARN wezterm_term::terminalstate > unhandled DecPrivateMode ResetDecPrivateMode(Unspecified(1015))
wezterm -n --config initial_rows=59 --config initial_cols=254 --config start 0,68s user 0,10s system 2% cpu 27,527 total
rosen at aleksandrov in ~
Well, that make sense. Let me work with it for some time and to report back.
Thank you for support.
For your information: I was using the same aur package and have now modified it to build in the same way as the official wezterm package in aur (cargo build --frozen --release --features distro-defaults
), and (at least for me), the high CPU usage is gone.
I didn't write that :-/ I'll get it fixed
Maintainer: wez ? Nevermind :)
he's right tho, he didn't write that: https://aur.archlinux.org/cgit/aur.git/commit/PKGBUILD?h=wezterm-git&id=5926f26f6c29b7020a9cf1ccce0e6edb07721ce4
sorry, had to check as I was curious how'd that happen :) (no blame-placing intended)
As a side note, this issue is what prevented me from even giving wezterm a try when I was looking for a replacement for qterminal, and now I'm glad to know why it happened and I'll make sure to try it in the future, once the yml configuration of alacritty becomes too unbearable to work with (because of how easy it is to eg. misindent or forget to uncomment a parent node and have your setting be ignored).
seems normal when using the default empty config.
my 'format-tab-title' callback is making it high cpu usage. my format-tab-title config: https://github.com/towry/dotfiles/blob/d23f10b7b8b6d84cda5afc4ec5c15061066ab58c/link/.config/wezterm/events.lua#L29
@wez Do you mind look at this what makes this callback consume so much cpu usage?
What Operating System(s) are you seeing this problem on?
Linux X11
Which Wayland compositor or X11 Window manager(s) are you using?
Mutter
WezTerm version
wezterm 20221023-205047-43f2265e
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
While working with multiple opened tabs, the CPU usage is insane, and it begins with lag. I cannot catch what is causing this.
To Reproduce
Open multiple tabs and run multiple tasks with thousands of lines output (like building or reading log files).
Configuration
wezterm.lua.zip
Expected Behavior
To work without insane CPU usage and insane lag (like it works on non GPU accelerated terminal emulators).
Logs
Anything else?
No response