unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Inefficient redisplay
@ 2010-04-12  4:34 Stefan Monnier
  2010-04-12 17:17 ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2010-04-12  4:34 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1515 bytes --]

I'm still playing around with my nhexl-mode attempt and I'm encournering
some serious performance problems.  One of them seems to be linked to
the fact that the redisplay code somehow seems to treat nhexl-mode's
buffers as one single long-line.

This is probably because all the \n have a display property on them that
makes them appear as an "␊" char.  The buffer's display does have
line separators in the overlays's before-strings, but apparently the
redisplay doesn't pay enough attention to them to notice that they can
be used to stop the search for the beginning of a line.

One related problem (which can be witnessed firsthand from Elisp) is
that all the text between point-min and the window's point is jit-locked
(even though only the text visible in the window should need to be
jit-locked).

Try the code below in the following way:

  % emacs -Q -l .../nhexl-mode.el <someasciifile> -f nhexl-mode
  M-x trace-function-background RET jit-lock-function RET
  M-: (display-buffer "*trace-output*") RET
  C-v C-v C-v C-v C-v
  M-: (put-text-property (point-min) (point-max) 'fontified nil)
  <move mouse to the other frame>

You should now see that jit-lock-function was called for positions 1,
508, 1032, and a few more, even though these are all before window-start.

This makes nhexl-mode completely unusable except on small buffers
(whereas some of the motivation for nhexl-mode was to have an
hex-editor that works even for very large files).


        Stefan



[-- Attachment #2: nhexl-mode.el --]
[-- Type: application/emacs-lisp, Size: 10945 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-04-15 17:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-12  4:34 Inefficient redisplay Stefan Monnier
2010-04-12 17:17 ` Eli Zaretskii
2010-04-12 19:28   ` Stefan Monnier
2010-04-12 20:53     ` Eli Zaretskii
2010-04-12 21:46       ` Stefan Monnier
2010-04-13 20:05         ` Eli Zaretskii
2010-04-14 18:13         ` Eli Zaretskii
2010-04-15  4:38           ` Stefan Monnier
2010-04-15 11:05             ` Eli Zaretskii
2010-04-15 17:34               ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).