Re: [LyX/master] Move input method debug messages to Debug::KEY category
Jean-Marc Lasgouttes via lyx-devel <[email protected]>
| Newsgroups | gmane.editors.lyx.devel |
|---|---|
| Message-ID | <[email protected]> |
Le 11/04/2026 à 15:40, Koji Yokota a écrit : >> Koji, why the #ifdef _DEBUG? It defeats the whole logic of runtime selection of debug messages. > > I might be too anxious about time efficiency. Am I right that LYXERR at least undertakes conditional check at run time? It might be very short time but my worry is that typing can be very sensitive to time lag (and also I have inserted too many debug codes). > > Those abundant debug messages are very useful at debug time to know what kind of communication is going on between application and the system (you know, we don’t know it a priori), but I’m concerned if it can be a burden in a release mode. The only test that will occur is a test on an integer. The strings to display are not evaluated at all if not necessary. It could be a proplem for a code executed a million times per second, but here we are talking about one test by keystroke. The traditional quote about this is "The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times; premature optimization is the root of all evil (or at least most of it) in programming." --- Donald E. Knuth So I would recommend removing the #ifdefs, and return to this issue if some efficiency issue is found. JMarc -- lyx-devel mailing list [email protected] https://lists.lyx.org/mailman/listinfo/lyx-devel