This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch tymux
in repository terminology.

View the commit online.

commit 383d0f4f62c434b8ccfaca10ca72dc3437729dd0
Author: [email protected] <[email protected]>
AuthorDate: Sun Mar 22 15:13:52 2026 -0600

    perf: suppress debug logging in tymuxd for 40x throughput gain
    
    Callgrind profiling revealed 97% of tymuxd's time was spent in
    eina_log_print → backtrace() → _dl_addr symbol resolution from
    117 DBG() calls in the escape sequence parser.  Set the log level
    to EINA_LOG_LEVEL_WARN to suppress debug/info messages that were
    being discarded anyway (stderr redirected to /dev/null).
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
---
 src/bin/termiointernals.c |  2 +-
 src/bin/tymuxd.c          | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/src/bin/termiointernals.c b/src/bin/termiointernals.c
index 04a38c65..8ac8ac13 100644
--- a/src/bin/termiointernals.c
+++ b/src/bin/termiointernals.c
@@ -2376,7 +2376,7 @@ termio_scroll(Evas_Object *obj, int direction,
    Termio *sd = termio_get_from_obj(obj);
    Termpty *ty;
 
-   EINA_SAFETY_ON_NULL_RETURN(sd);
+   if (!sd) return; /* headless daemon (tymuxd) has no termio widget */
 
    ty = sd->pty;
 
diff --git a/src/bin/tymuxd.c b/src/bin/tymuxd.c
index 2f90b231..e6898ee1 100644
--- a/src/bin/tymuxd.c
+++ b/src/bin/tymuxd.c
@@ -104,13 +104,33 @@ main(int argc, char **argv)
    /* ── EFL init ───────────────────────────────────────────────── */
 
    eina_init();
+
+   /* Suppress all log messages below ERR.  The headless daemon redirects
+    * stderr to /dev/null, so log output is never visible.  Each log call
+    * triggers backtrace() → _dl_addr symbol resolution in the Eina log
+    * printer, which is catastrophically expensive.  The 55+ WRN calls in
+    * termptyesc.c ("TODO", "unhandled") fire on common shell escape
+    * sequences and dominate the profile.  Set both the global level and
+    * the per-domain level (the global level may not propagate to domains
+    * registered inside termpty_init). */
+   eina_log_level_set(EINA_LOG_LEVEL_ERR);
+
    ecore_init();
    termpty_init();
 
+   eina_log_domain_level_set("termpty", EINA_LOG_LEVEL_ERR);
+   eina_log_domain_level_set("ecore", EINA_LOG_LEVEL_ERR);
+   eina_log_domain_level_set("eina_safety", EINA_LOG_LEVEL_ERR);
+
    _log_domain = eina_log_domain_register("tymuxd", NULL);
    if (_log_domain < 0)
      EINA_LOG_ERR("Could not create log domain 'tymuxd'");
 
+   /* Suppress DBG/INF log messages in the daemon — the expensive backtrace
+    * in eina_log_print_cb_stderr makes them catastrophically slow, and
+    * stderr is redirected to /dev/null anyway. */
+   eina_log_level_set(EINA_LOG_LEVEL_WARN);
+
    /* Prevent SIGPIPE from killing the daemon on broken socket writes */
    signal(SIGPIPE, SIG_IGN);
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to