emacs/var/elfeed/db/data/d2/d2641d4072d313d0bc7a11d72e6ebe735d461155
2022-01-03 12:49:32 -06:00

1 line
2 KiB
Plaintext

<!-- SC_OFF --><div class="md"><p>I need to investigate text log files a lot. Emacs with <code>auto-revert-tail-mode</code> does the job almost fine, except when there are long lines (JSON/XML dumps, 1-40kb large).</p> <p>In that case Emacs lags a lot.</p> <p>I use <code>fundamental-mode</code> + add few <code>font-lock-add-keywords</code> by (highlighting for INFO/DEBUG/ERROR &amp; for date/time):</p> <p><a href="http://hg.defun.work/dot-emacs/file/tip/mylisp/log4-hi-mode.el">http://hg.defun.work/dot-emacs/file/tip/mylisp/log4-hi-mode.el</a></p> <p>Even with plain <code>fundamental-mode</code> Emacs is unresponsible. I tried debug on error on C-g and the stacktrace is only native rendering function <code>redisplay_internal</code>.</p> <p>Just writing the post I tried <code>so-long-mode</code> instead of <code>fundamental-mode</code> and it is much better but still noticeably lagging. Few extra <code>font-lock-add-keywords</code> in <code>so-long-mode</code> doesn&#39;t have huge impact: movement is just a bit slower than without.</p> <p>I don&#39;t like to open Notepad++ just for log files, though it might be the proper solution...</p> <p>Any suggestions on debugging long line issue?</p> <p>Could we expect Emacs rendering of long lines improved? </p> <p>I&#39;m with Cygwin Emacs W32 27.2. Almost the same situation with Emacs 27.1 in WSL1 terminal. <code>so-long-mode</code> provides better experience, few <code>font-lock-add-keywords</code> ruin smoothness of movement.</p> <p><strong>UPDATE</strong> I really need some highlighting for log files (date/time + INFO/DEBUG/ERROR): I expect some help from the tool.</p> </div><!-- SC_ON --> &#32; submitted by &#32; <a href="https://www.reddit.com/user/gavenkoa"> /u/gavenkoa </a> <br/> <span><a href="https://www.reddit.com/r/emacs/comments/rcgjpt/browsing_long_lines_are_extremely_slow_i_study/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/emacs/comments/rcgjpt/browsing_long_lines_are_extremely_slow_i_study/">[comments]</a></span>