If you have 10 million lines in a pane's history then resizing will take
a while because tmux will need to walk every line in order to see if it
needs to reflow it. This is likely to be about 1-2 GB of history so it
will take a while. It will be quicker if you do it twice in succession
because it will need to do less work and the history is likely to be
already in memory or cache.
Why do you need such a big history? Surely there is no realistic way you
can work with it interactively? Why not just write the output to a file
with tee? If you had 10 panes with 10 million lines, tmux will be using
up to 20 GB of memory.
There was some work on storing history in chunks so it could reflow
sections on demand but it is complicated and was never finished. You
will need to experiment to see what size of history is fast enough for
you but I would probably start with 100000 lines.
If you must have a huge history limit, you can try turning off reflow by
making this change and rebuilding tmux:
diff --git a/screen.c b/screen.c
index 95299306..4e0e03e6 100644
--- a/screen.c
+++ b/screen.c
@@ -226,6 +226,8 @@ screen_resize_cursor(struct screen *s, u_int sx, u_int sy, int reflow,
{
u_int cx = s->cx, cy = s->grid->hsize + s->cy;
+ reflow = 0;
+
if (s->write_list != NULL)
screen_write_free_list(s);
> Oh, wow! It doesA happen when resizing the terminal. I had not even
> noticed. That explains why it often happens after attaching after a
> computer restart, I guess.
> I see inA
https://github.com/tmux/tmux/issues/2197A that this was a
> libevent issue. But I'm on Manjaro, a rolling release, and my system
> libevent is 2.1.11-5. So I'm not sure if it's the same issue.
> Maybe step 1 is to disable the plugins and see if the issue
> persists.
> On Tuesday, May 5, 2020 at 6:34:00 PM UTC+2, Nicholas Marriott
> wrote:
>
> Hi
>
> Is this when you resize the terminal?
>
> Does it still happen if you turn off tmux-resurrect and
> tmux-continuum?
>
> If you can reproduce you can run tmux with logging:
>
>
https://github.com/tmux/tmux/blob/master/.github/CONTRIBUTING.md#how-do-i-get-logs-from-tmux
>
> On Tue, May 05, 2020 at 09:30:22AM -0700, Kevin Kaland wrote:
> > A A System:
> > A A LSB Version: n/a
> > A A Distributor ID: A ManjaroLinux
> > A A Description: A Manjaro A Linux
> > A A Release: A 20.0
> > A A Codename: A Lysia
> > A A tmux 3.1a
> > A A Within the past couple of weeks or past month, I've started
> getting
> > A A freezes in tmux, often just after attaching to a session,
> and then
> > A A periodically within the session. I use the tmux-resurrect
> and
> > A A tmux-continuum plugins. I am wondering if the history they
> are saving
> > A A could be making tmux hang while processing something.
> However, I'm not
> > A A really sure how to debug this. Are there any debug logs or
> timing logs I
> > A A could try to record and then submit somewhere or review
> myself? When the
> > A A issue occurs, I can see tmux working in `htop`. Sometimes
> my computer's
> > A A fan even comes on in tandem with the freeze. But I am not
> sure what it's
> > A A processing. A lot of my history seems to have disappeared
> recently,
> > A A anyway, so I'm not sure that I'm on the right track there.
> > A A I wanted to post here before posting a GitHub issue so that
> I could post a
> > A A better one if I wound up doing so.
> >
> > A A --
> > A A You received this message because you are subscribed to the
> Google Groups
> > A A "tmux-users" group.
> > A A To unsubscribe from this group and stop receiving emails
> from it, send an
> > A A email to
tmux-...@googlegroups.com.
> > A A To view this discussion on the web, visit
> > A
> A
https://groups.google.com/d/msgid/tmux-users/d9f017fe-ae02-4fed-9725-5cc243da1243%40googlegroups.com.
>
> --
> You received this message because you are subscribed to the Google Groups
> "tmux-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
tmux-users+...@googlegroups.com.
> To view this discussion on the web, visit
>
https://groups.google.com/d/msgid/tmux-users/cc777e34-09cb-4a83-820c-a78de8a37267%40googlegroups.com.