Yes the size of struct grid_cell increased to add the underscore colour,
you must have a lot of extended cells.
It does seem a bit weird because it was 36 bytes and is now 40 for me,
which is not much of an increase, perhaps your compiler is packing it
very badly.
But we can pack it better, please try this and see if it helps:
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 3 Jul 2019 16:49:45 -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, ' ' } }
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 3 Jul 2019 16:49:45 -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 3 Jul 2019 16:49:45 -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 3 Jul 2019 16:49:45 -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 Wed, Jul 03, 2019 at 09:20:25AM -0700, Suraj N. Kurapati wrote:
> Great point! Indeed, I keep the maximum allowed scrollback histories:
>
> set-option -g history-limit 32767
>
> Here is the result of running the diagnostic command you had provided:
>
> *** 3.0-rc ***
>
> $ git rev-parse --short HEAD
> 5a501a8a
>
> $ tmux -V
> tmux 3.0-rc3
>
> $ pgrep tmux | xargs -r ps u
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> sunny 5047 0.0 0.0 7120 3208 pts/1 S+ 09:16 0:00 tmux
> sunny 5049 14.2 7.7 316064 311552 ? Rs 09:16 0:06 tmux
>
> $ tmux lsp -aF '#{pane_id} #{history_bytes}'
> %1 10414942
> %2 11566347
> %3 29081
> %4 29299
> %5 14790000
> %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
>
> *** MASTER ***
>
> $ git rev-parse --short HEAD
> be5af704
>
> $ tmux -V
> tmux next-3.1
>
> $ pgrep tmux | xargs ps u
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> sunny 27524 0.0 0.0 7124 812 pts/1 S+ 09:08 0:00 tmux
> sunny 27526 13.7 28.3 1141996 1135832 ? Rs 09:08 0:13 tmux
>
> $ tmux lsp -aF '#{pane_id} #{history_bytes}'
> %1 13513750
> %2 21892475
> %3 147521
> %4 137819
> %5 124611630
> %6 46864
> %7 40913858
> %8 114684856
> %9 298109
> %10 1429057
> %11 9660307
> %12 3092193
> %13 3463888
> %14 1382540
> %15 23361921
> %16 14491614
> %17 52734235
> %18 94974603
> %19 879626
> %20 28649231
> %21 103158320
> %22 127392471
> %23 54594903
> %24 105133611
> %25 37563986
> %26 37268993
> %27 12498662
> %28 15138678
> %29 18205593
> %30 1078476
> %31 1221090
> %32 1609525
>
> On Mon, 1 Jul 2019 09:08:56 +0100, Nicholas Marriott wrote:
> > I can't reproduce this with 32 panes. What does this show in each
> > version:
> >
> > tmux lsp -aF '#{pane_id} #{history_bytes}'
> >
> > On Fri, Jun 28, 2019 at 12:43:59PM -0700, Suraj N. Kurapati wrote:
> > > I have a total of 9 windows and 32 panes in my saved session:
> > >
> > > On Fri, 28 Jun 2019 19:40:22 +0100, Nicholas Marriott wrote:
> > > > Seems OK to me. How many windows, panes etc do you have?
> > > >
> > > > On Fri, Jun 28, 2019 at 11:07:39AM -0700, Suraj N. Kurapati
> > > > wrote:
> > > > > In particular, the VSZ has doubled in next-3.1 compared to
> > > > > 3.0-rc3.
--
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/20190703165101.jsp4w2o44oavpaec%40yelena.
For more options, visit https://groups.google.com/d/optout.