emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about üarent-frame changes


From: Gerd Möllmann
Subject: Re: Question about üarent-frame changes
Date: Thu, 26 Sep 2024 06:54:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Gerd Möllmann <gerd.moellmann@gmail.com> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> From: Gerd Möllmann <gerd.moellmann@gmail.com>
>>> Cc: martin rudalics <rudalics@gmx.at>,  Emacs Devel <emacs-devel@gnu.org>
>>> Date: Wed, 25 Sep 2024 13:13:09 +0200
>>>
>>> > shows 24s with GUI, and 8s on tty. I'm using Alacritty, in case that 
>>> > matters
>>> > (for the KKP keyboard support, not for performance).
>>>
>>> Small correction - I had timed tty build with debug. It's actually 2s
>>> instead of 8s.
>>
>> Thanks.  It would be interesting to know which part takes
>> significantly more time on GUI terminals wrt TTYs.  A tenfold
>> performance difference should be easy to explain, I hope.
>
> I don't seem to get profiling to work on macOS 15 + Xcode 16 at the moment.
>
> Maybe someone else could run the benchmark I posted under perf? It
> should just work with an existing master, or 30, or 29 on GUIs.

Got at least something out of Instruments today. An example run in a
debug build with MPS shows as "Heaviest Stack Trace" this:

21.15 s  94,1 % 0 s       Main Thread  0x158f26
18.63 s  82,9 % 0 s                                               apply_lambda
12.11 s  53,9 % 0 s                                                
exec_byte_code
8.04 s  35,8 %  1.00 ms                                                         
     CA::Context::commit_transaction(CA::Transaction*, double, double*)
5.33 s  23,7 %  0 s                                                             
      CA::Layer::layout_if_needed(CA::Transaction*)
5.32 s  23,7 %  2.00 ms                                                         
        redisplay_internal
3.96 s  17,6 %  0 s                                                             
         redisplay_windows
3.56 s  15,8 %  0 s                                                             
             update_frame_tool_bar_1
2.62 s  11,6 %  0 s                                                             
              -[NSToolbar 
_setConfigurationFromDictionary:notifyFamilyAndUpdateDefaults:upgradedConfiguration:]
1.81 s   8,1 %  0 s                                                             
                            -[NSToolbarView 
_layoutDirtyItemViewersAndTileToolbar]
854.00 ms   3,8 %       0 s                                                     
                                     -[NSToolbarView 
_configureItemViewersForLayoutIfNecessary]
669.00 ms   3,0 %       0 s                                                     
                                       -[NSToolbarItemViewer 
_configureViewerSize]
397.00 ms   1,8 %       0 s                                                     
                                        -[NSToolbarItem _scalableMinSize]
359.00 ms   1,6 %       0 s                                                     
                                          -[NSToolbarItem 
_itemViewMinSize:maxSize:stretchesContent:]
179.00 ms   0,8 %       0 s                                                     
                                           _nsis_frameInEngine

I think this this means that the window system itself takes a lot of the
time (CA::..., NS...), plus redisplay on GUI of course, which I would
expect to be a bit slower than on ttys, but mainly the window system.

That's also consistent with the fact that the times differ only a bit
between optimized and debug builds with checking=all.

Not much one can do about that, I guess. At least on macOS, it could
be different on other platforms of course.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]