From: Masatake YAMATO <jet@gyve.org>
Cc: emacs-devel@gnu.org
Subject: Re: hexl-find-file is sloooow
Date: Tue, 21 Dec 2004 20:47:09 +0900 (JST) [thread overview]
Message-ID: <20041221.204709.15226525.jet@gyve.org> (raw)
In-Reply-To: <m3zn07lx62.fsf@kfs-l.imdomain.dk>
> >> 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?
>
> Maybe it could be turned off for large files?
> Or it could at least ask for confirmation to fontify a large buffer.
Thank you for your suggestion.
Before implementing your idea, I'd like to try my idea.
In the fontification code, `re-search-forward' is used:
(save-excursion
(goto-char (point-min))
(while (re-search-forward "^[0-9a-f]+:" nil t)
(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)
(put-text-property (match-beginning 1) (match-end 1)
'font-lock-face 'hexl-ascii-area)))
I think it is possible to do the same thing without `re-search-forward'.
If `re-search-forward' takes longer time than `put-text-property',
the fontification code will be faster with my idea.
Masatake YAMATO
next prev parent reply other threads:[~2004-12-21 11:47 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
2004-12-21 11:15 ` Kim F. Storm
2004-12-21 11:47 ` Masatake YAMATO [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041221.204709.15226525.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 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).