Greetings,

I would like to inquire about the following longstanding behavior:

TeXmacs continuously executes GUI update cycle while idle (≈4% CPU on Apple 
Silicon  macOS)

Version

TeXmacs 2.1.5

Apple Silicon M2

macOS Tahoe 26.6 (25G72)

Observed behavior

When TeXmacs is completely idle, the process continuously consumes about 4% CPU 
according to Activity Monitor.

This is not specific to Tahoe. I have observed the same behavior on previous 
macOS releases for many years, sometimes as high as about 10% CPU depending on 
the machine and TeXmacs version.

The CPU usage is present while the editor is idle, with no typing or background 
activity. It also persists when the application is hidden or minimized.

Sampling results

A sample of the process shows that the main thread spends most of its time 
sleeping in the Cocoa event loop, but is periodically awakened by a Qt timer:

QCocoaEventDispatcherPrivate::activateTimersSourceCallback
  QTimerInfoList::activateTimers
    QTimer::timerEvent
      QTMGuiHelper::doUpdate()
        qt_gui_rep::update()
          tm_server_rep::interpose_handler()
            edit_interface_rep::apply_changes()
The update path is entered repeatedly even though the editor is idle.

In several independent samples, the same call chain appears consistently.

Expected behavior

When there are no pending editor changes, I would expect the GUI update 
machinery either not to be invoked or to return almost immediately, resulting 
in negligible idle CPU usage.

I can provide the full sample output if it would be useful.



I am not in a position to call this a bug because the stack trace only shows 
where time is spent, not necessarily why. The developers are in the best 
position to decide whether this behavior is intentional.

If this behavior is expected, it would be useful to know which component 
requires the periodic updates.

Best regards,

Fatihcan Atay





_______________________________________________
Texmacs-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/texmacs-dev

Reply via email to