From: Masatake YAMATO <jet@gyve.org>
Cc: emacs-devel@gnu.org
Subject: Re: hexl-find-file is sloooow
Date: Tue, 21 Dec 2004 17:50:09 +0900 (JST) [thread overview]
Message-ID: <20041221.175009.221966310.jet@gyve.org> (raw)
In-Reply-To: <20041221.081752.05872292.wl@gnu.org>
> hexl-find-file is quite slow -- loading a 4MByte font takes more than
> half a minute on my laptop...
>
> I ask to add progress information while hexl-find-file is running.
>
> Of course, this isn't something urgent, but perhaps it can be added to
> the post-release TODO list.
It seems that fontification takes long time.
As far as I can remember the area fontification is introduced by me.
Do you want to turn off the fortification?
Anyway, here is a progress reporter. If there is no objection,
I will install this patch in a day.
Regards,
Masatake YAMATO
2004-12-21 Masatake YAMATO <jet@gyve.org>
* hexl.el (hexlify-buffer): Report fontification progress.
Index: hexl.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/hexl.el,v
retrieving revision 1.90
diff -u -r1.90 hexl.el
--- hexl.el 21 Nov 2004 00:38:34 -0000 1.90
+++ hexl.el 21 Dec 2004 08:46:23 -0000
@@ -680,19 +680,26 @@
;; Don't decode text in the ASCII part of `hexl' program output.
(let ((coding-system-for-read 'raw-text)
(coding-system-for-write buffer-file-coding-system)
- (buffer-undo-list t))
+ (buffer-undo-list t)
+ progress pmax)
(apply 'call-process-region (point-min) (point-max)
(expand-file-name hexl-program exec-directory)
t t nil (split-string hexl-options))
+ (setq pmax (point-max)
+ progress (make-progress-reporter "Hexl Buffer Fontification "
+ (point-min) (* 2 pmax)))
(save-excursion
(goto-char (point-min))
(while (re-search-forward "^[0-9a-f]+:" nil t)
+ (progress-reporter-update progress (point))
(put-text-property (match-beginning 0) (match-end 0)
'font-lock-face 'hexl-address-area))
(goto-char (point-min))
(while (re-search-forward " \\(.+$\\)" nil t)
+ (progress-reporter-update progress (+ pmax (point)))
(put-text-property (match-beginning 1) (match-end 1)
'font-lock-face 'hexl-ascii-area)))
+ (progress-reporter-done progress)
(if (> (point) (hexl-address-to-marker hexl-max-address))
(hexl-goto-address hexl-max-address))))
next prev parent reply other threads:[~2004-12-21 8:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-21 7:17 hexl-find-file is sloooow Werner LEMBERG
2004-12-21 8:50 ` Masatake YAMATO [this message]
2004-12-21 11:15 ` Kim F. Storm
2004-12-21 11:47 ` Masatake YAMATO
2004-12-21 13:18 ` Kim F. Storm
2004-12-22 0:17 ` Richard Stallman
2004-12-22 6:51 ` Masatake YAMATO
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041221.175009.221966310.jet@gyve.org \
--to=jet@gyve.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.