[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tooltips GC overhead
From: |
Eli Zaretskii |
Subject: |
Re: Tooltips GC overhead |
Date: |
Thu, 30 Jul 2015 19:36:04 +0300 |
> Date: Thu, 30 Jul 2015 11:05:47 +0200
> From: martin rudalics <address@hidden>
> Cc: address@hidden
>
> >> I suppose you didn't wait until the tooltips really showed up.
> >
> > No, I waited.
>
> This is hopeless. Evaluating
>
> (let ((c cons-cells-consed)
> (v vector-cells-consed))
> (tooltip-show "foobar")
> (message "cons: %s vector: %s"
> (- cons-cells-consed c)
> (- vector-cells-consed v)))
>
> gives here "cons: 58696 vector: 9443". Evaluating
>
> (let ((c cons-cells-consed)
> (v vector-cells-consed))
> (x-show-tip "foobar")
> (message "cons: %s vector: %s"
> (- cons-cells-consed c)
> (- vector-cells-consed v)))
>
> gets me "cons: 58649 vector: 9443", so the remainder of `tooltip-show'
> is responsible for just 47 additional conses. We can ignore that.
>
> I suppose most of the overhead goes to x_create_tip_frame - a normal
> `make-frame' here gets me "cons: 37464 vector: 33018". Calculating the
> tooltip position doesn't seem to add much overhead. So the only way to
> fix this is to hide tooltip frames instead of deleting and re-creating
> them. If this can be done properly.
According to my testing, over 80% of consing happens inside
face-spec-recalc which is called by face-set-after-frame-default on
all the known faces.
I guess your numbers above are from a non-Q session with a lot of
additional faces, because in "emacs -Q" I get "only" about 15000
conses from a single tool-tip.
So maybe one other idea is to skip faces that are obviously unused in
tip frames.
Or maybe we should just make gc-cons-threshold higher ;-)
This is not new, btw: Emacs 24.1 exhibits approximately the same
numbers, Emacs 23 conses only two thirds of that, and Emacs 22.3 one
third.
- Re: Tooltips GC overhead, (continued)
- Re: Tooltips GC overhead, martin rudalics, 2015/07/29
- Re: Tooltips GC overhead, Paul Eggert, 2015/07/29
- Re: Tooltips GC overhead, martin rudalics, 2015/07/29
- Re: Tooltips GC overhead, Eli Zaretskii, 2015/07/29
- Re: Tooltips GC overhead, martin rudalics, 2015/07/29
- Re: Tooltips GC overhead, Paul Eggert, 2015/07/29
- Re: Tooltips GC overhead, martin rudalics, 2015/07/30
- Re: Tooltips GC overhead, martin rudalics, 2015/07/30
- Re: Tooltips GC overhead, Paul Eggert, 2015/07/30
- Re: Tooltips GC overhead, martin rudalics, 2015/07/30
- Re: Tooltips GC overhead,
Eli Zaretskii <=
- Re: Tooltips GC overhead, martin rudalics, 2015/07/30
- Re: Tooltips GC overhead, Stefan Monnier, 2015/07/30
- RE: Tooltips GC overhead, Drew Adams, 2015/07/30
- Re: Tooltips GC overhead, Eli Zaretskii, 2015/07/31
- Re: Tooltips GC overhead, Eli Zaretskii, 2015/07/31
- Re: Tooltips GC overhead, Paul Eggert, 2015/07/29
- Re: Tooltips GC overhead, martin rudalics, 2015/07/29
- Re: Tooltips GC overhead, Paul Eggert, 2015/07/29
- Re: Tooltips GC overhead, martin rudalics, 2015/07/30