That did the trick! :) VSZ has reduced down to 3.0-rc levels, thanks! $ pgrep tmux | xargs -r ps u USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND sunny 350 0.0 0.0 7124 3420 pts/1 S+ 15:52 0:00 tmux sunny 352 10.9 7.7 314640 310044 ? Rs 15:52 0:06 tmux
$ tmux lsp -aF '#{pane_id} #{history_bytes}'
%1 10414942
%2 11566347
%3 29081
%4 29299
%5 12493950
%6 19912
%7 19570538
%8 16828680
%9 45909
%10 708177
%11 1416667
%12 457673
%13 528808
%14 1296060
%15 9743781
%16 9868770
%17 7045780
%18 11011243
%19 835906
%20 22567043
%21 13197272
%22 15372503
%23 19222647
%24 12896611
%25 4660126
%26 11658149
%27 4434778
%28 11079426
%29 2222177
%30 124916
%31 302090
%32 194485
$ git log --oneline | head -3
aa085e68 underscore-2x-memory-try3.patch
bc112a8c Merge branch 'obsd-master'
55c694a4 Do not use uninitialized buffer name.
On Fri, 5 Jul 2019 08:42:43 +0100, Nicholas Marriott wrote:
> Try this please:
>
> Index: format-draw.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/tmux/format-draw.c,v
> retrieving revision 1.11
> diff -u -p -r1.11 format-draw.c
> --- format-draw.c 1 Jul 2019 06:56:00 -0000 1.11
> +++ format-draw.c 5 Jul 2019 07:42:28 -0000
> @@ -565,7 +565,7 @@ format_draw(struct screen_write_ctx *oct
> cp++;
> }
>
> - /* Draw the cell to th current screen. */
> + /* Draw the cell to the current screen. */
> screen_write_cell(&ctx[current], &sy.gc);
> width[current] += ud->width;
> continue;
> Index: grid.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/tmux/grid.c,v
> retrieving revision 1.96
> diff -u -p -r1.96 grid.c
> --- grid.c 27 Jun 2019 15:17:41 -0000 1.96
> +++ grid.c 5 Jul 2019 07:42:28 -0000
> @@ -37,12 +37,12 @@
>
> /* Default grid cell data. */
> const struct grid_cell grid_default_cell = {
> - 0, 0, 8, 8, 0, { { ' ' }, 0, 1, 1 }
> + { { ' ' }, 0, 1, 1 }, 0, 0, 8, 8, 0
> };
>
> /* Cleared grid cell data. */
> const struct grid_cell grid_cleared_cell = {
> - GRID_FLAG_CLEARED, 0, 8, 8, 0, { { ' ' }, 0, 1, 1 }
> + { { ' ' }, 0, 1, 1 }, 0, GRID_FLAG_CLEARED, 8, 8, 0
> };
> static const struct grid_cell_entry grid_cleared_entry = {
> GRID_FLAG_CLEARED, { .data = { 0, 8, 8, ' ' } }
> @@ -475,6 +475,7 @@ grid_get_cell1(struct grid_line *gl, u_i
> gc->bg = gce->data.bg;
> if (gce->flags & GRID_FLAG_BG256)
> gc->bg |= COLOUR_FLAG_256;
> + gc->us = 0;
> utf8_set(&gc->data, gce->data.data);
> }
>
> Index: screen-write.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/tmux/screen-write.c,v
> retrieving revision 1.154
> diff -u -p -r1.154 screen-write.c
> --- screen-write.c 27 Jun 2019 15:17:41 -0000 1.154
> +++ screen-write.c 5 Jul 2019 07:42:28 -0000
> @@ -36,7 +36,7 @@ static const struct grid_cell *screen_wr
> const struct utf8_data *, u_int *);
>
> static const struct grid_cell screen_write_pad_cell = {
> - GRID_FLAG_PADDING, 0, 8, 8, 0, { { 0 }, 0, 0, 0 }
> + { { 0 }, 0, 0, 0 }, 0, GRID_FLAG_PADDING, 0, 8, 8
> };
>
> struct screen_write_collect_item {
> Index: style.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/tmux/style.c,v
> retrieving revision 1.22
> diff -u -p -r1.22 style.c
> --- style.c 1 Jul 2019 06:56:00 -0000 1.22
> +++ style.c 5 Jul 2019 07:42:28 -0000
> @@ -30,7 +30,7 @@
>
> /* Default style. */
> static struct style style_default = {
> - { 0, 0, 8, 8, 0, { { ' ' }, 0, 1, 1 } },
> + { { { ' ' }, 0, 1, 1 }, 0, 0, 8, 8, 0 },
>
> 8,
> STYLE_ALIGN_DEFAULT,
> Index: tmux.h
> ===================================================================
> RCS file: /cvs/src/usr.bin/tmux/tmux.h,v
> retrieving revision 1.918
> diff -u -p -r1.918 tmux.h
> --- tmux.h 1 Jul 2019 06:56:00 -0000 1.918
> +++ tmux.h 5 Jul 2019 07:42:28 -0000
> @@ -596,13 +596,13 @@ enum utf8_state {
>
> /* Grid cell data. */
> struct grid_cell {
> - u_char flags;
> + struct utf8_data data; /* 21 bytes */
> u_short attr;
> + u_char flags;
> int fg;
> int bg;
> int us;
> - struct utf8_data data;
> -};
> +} __packed;
> struct grid_cell_entry {
> u_char flags;
> union {
>
>
> On Thu, Jul 04, 2019 at 08:37:04PM -0700, Suraj N. Kurapati wrote:
> > Yes, reverting commit dae2868 on top of master (at be5af70) fixes
> > it:
> >
> > $ pgrep tmux | xargs -r ps u
> > USER PID %CPU %MEM VSZ RSS TTY STAT START TIME
> > COMMAND sunny 8785 0.0 0.0 7124 3416 pts/1 S+ 20:24
> > 0:00 tmux sunny 8787 1.9 7.6 311848 308104 ? Rs
> > 20:24 0:08 tmux
> >
> > $ git log --oneline | head -3
> > ac5ca8a6 (HEAD -> revive) Revert "Add support for underscore
> > colours with Setulc capability, mostly from" be5af704
> > (origin/master, origin/HEAD) Merge branch 'obsd-master' 6a489fa7
> > Command prompt key presses need to avoid the command queue, GitHub
> > issue 1817. Also a tmux.1 fix from jmc.
> >
> > On Thu, 4 Jul 2019 20:22:54 +0100, Nicholas Marriott wrote:
> > > Does it fix it if you revert the underscore colour commit?
> > >
> > >
> > > On Wed, Jul 03, 2019 at 02:27:59PM -0700, Suraj N. Kurapati wrote:
> > > > Also, for contrast, here is the effect of the same patch on
> > > > 3.0-rc. Both 3.0-rc (printf patch) and master (compaction +
> > > > printf patches) are reporting the same 36 number for the size
> > > > of struct grid_cell.
> > > >
> > > > $ pgrep tmux | xargs -r ps u
> > > > USER PID %CPU %MEM VSZ RSS TTY STAT START TIME
> > > > COMMAND sunny 11467 0.0 0.0 7120 3280 pts/1 S+
> > > > 14:13 0:00 tmux sunny 11469 1.3 7.7 313312 309536 ?
> > > > Rs 14:13 0:09 tmux
> > > >
> > > > $ tmux display -p '#{history_bytes}'
> > > > 68939,36
> > > >
> > > > $ tmux lsp -aF '#{pane_id} #{history_bytes}'
> > > > %1 10414942,36
> > > > %2 11566347,36
> > > > %3 68939,36
> > > > %4 29299,36
> > > > %5 14790000,36
> > > > %6 19912,36
> > > > %7 19570538,36
> > > > %8 16828680,36
> > > > %9 45909,36
> > > > %10 708177,36
> > > > %11 1416667,36
> > > > %12 457673,36
> > > > %13 528808,36
> > > > %14 1296060,36
> > > > %15 9743781,36
> > > > %16 9868770,36
> > > > %17 7045780,36
> > > > %18 11011243,36
> > > > %19 835906,36
> > > > %20 22567043,36
> > > > %21 13197272,36
> > > > %22 15372503,36
> > > > %23 19222647,36
> > > > %24 12896611,36
> > > > %25 4660126,36
> > > > %26 11658149,36
> > > > %27 4434778,36
> > > > %28 11079426,36
> > > > %29 2222177,36
> > > > %30 124916,36
> > > > %31 302090,36
> > > > %32 194485,36
> > > >
> > > > On Wed, 3 Jul 2019 14:12:57 -0700, Suraj N. Kurapati wrote:
> > > > > With both patches applied, here is the new VSZ and diagnostic
> > > > > output:
> > > > >
> > > > > $ pgrep tmux | xargs -r ps u
> > > > > USER PID %CPU %MEM VSZ RSS TTY STAT START
> > > > > TIME COMMAND sunny 2064 0.0 0.0 7124 3384 pts/1
> > > > > S+ 14:07 0:00 tmux sunny 2066 22.6 26.1 1050128
> > > > > 1045272 ? Rs 14:07 0:11 tmux
> > > > >
> > > > > $ tmux display -p '#{history_bytes}'
> > > > > 113399862,36
> > > > >
> > > > > $ tmux lsp -aF '#{pane_id} #{history_bytes}'
> > > > > %1 12352246,36
> > > > > %2 21097851,36
> > > > > %3 135677,36
> > > > > %4 126967,36
> > > > > %5 113399862,36
> > > > > %6 44104,36
> > > > > %7 37920818,36
> > > > > %8 104899188,36
> > > > > %9 272889,36
> > > > > %10 1544601,36
> > > > > %11 8835943,36
> > > > > %12 2828741,36
> > > > > %13 3170380,36
> > > > > %14 1333320,36
> > > > > %15 21239769,36
> > > > > %16 13284234,36
> > > > > %17 48166564,36
> > > > > %18 86578267,36
> > > > > %19 875254,36
> > > > > %20 26066171,36
> > > > > %21 94160444,36
> > > > > %22 116190395,36
> > > > > %23 49716951,36
> > > > > %24 95909911,36
> > > > > %25 34273150,36
> > > > > %26 34015805,36
> > > > > %27 12252574,36
> > > > > %28 13825470,36
> > > > > %29 16606409,36
> > > > > %30 983120,36
> > > > > %31 1129190,36
> > > > > %32 1468021,36
> > > > >
> > > > > On Wed, 3 Jul 2019 20:12:45 +0100, Nicholas Marriott wrote:
> > > > > > Apply this please and show me the output of
> > > > > >
> > > > > > tmux display -p '#{history_bytes}'
> > > > > >
> > > > > > In any pane.
> > > > > >
> > > > > >
> > > > > > Index: format.c
> > > > > > ===================================================================
> > > > > > RCS file: /cvs/src/usr.bin/tmux/format.c,v
> > > > > > retrieving revision 1.207
> > > > > > diff -u -p -r1.207 format.c
> > > > > > --- format.c 24 Jun 2019 10:04:29 -0000 1.207
> > > > > > +++ format.c 3 Jul 2019 19:12:18 -0000
> > > > > > @@ -612,7 +612,7 @@ format_cb_history_bytes(struct format_tr
> > > > > > }
> > > > > > size += gd->hsize * sizeof *gl;
> > > > > >
> > > > > > - xasprintf(&fe->value, "%llu", size);
> > > > > > + xasprintf(&fe->value, "%llu,%zu", size, sizeof
> > > > > > (struct grid_cell)); }
> > > > > >
> > > > > > /* Callback for pane_tabs. */
> > > > > >
> > >
> > >
>
>
--
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 [email protected].
To post to this group, send an email to [email protected].
To view this discussion on the web, visit
https://groups.google.com/d/msgid/tmux-users/20190705155801.5088ca71%40ratham.attlocal.net.
For more options, visit https://groups.google.com/d/optout.
pgpLOmYSityEx.pgp
Description: OpenPGP digital signature
