[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: very slow archive-mode
From: |
Kenichi Handa |
Subject: |
Re: very slow archive-mode |
Date: |
Thu, 13 Mar 2008 16:51:34 +0900 |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
In article <address@hidden>, Stefan Monnier <address@hidden> writes:
> > I regularly open Java source archive (JAR of several tens of megabytes)
> > in Emacs. Recently I recompiled Emacs from CVS and noticed that process
> > of opening and parsing archive had become times slower (didn't measure
> > precisely, but I guess about 5--10x slowdown is there). Can anyone
> > investigate the problem or just guess what changes caused it? I don't
> > remember when I compiled Emacs previously, I guess it was a couple month
> > old.
> I reported a similar problem. I believe set-buffer-multibyte is *a lot*
> slower now, and may even have a time complexity of O(N^2).
I suspect so too. Now set-buffer-multibyte must convert
more 8-bit bytes to mutlibyte forms and that results in more
movement and increasing of the gap. This code:
(let ((str (buffer-string)))
(erase-buffer)
(set-buffer-multibyte t)
(decode-coding-string str 'no-conversion nil (current-buffer))))
runs much faster than set-buffer-multibyte. But then, I
think it is better that we read archive files into a
multibyte buffer from the start by no-conversion-multibyte.
As I've just found a bug in handling
no-conversion-multibyte, I'll fix it soon. After that, I am
going to change auto-coding-alist to use
no-conversion-multibyte for archive files, and adjust
arc-mode and tar-mode.
What do you think?
---
Kenichi Handa
address@hidden
PS. Another idea is keep archive files in a unibyte buffer
and have the file listing part in another multibyte buffer.
More radical idea is to allow changing multibyteness only in
the narrowed region.
- very slow archive-mode, Paul Pogonyshev, 2008/03/12
- Re: very slow archive-mode, Stefan Monnier, 2008/03/12
- Re: very slow archive-mode, Juri Linkov, 2008/03/12
- Re: very slow archive-mode,
Kenichi Handa <=
- Re: very slow archive-mode, Stefan Monnier, 2008/03/13
- Re: very slow archive-mode, Stefan Monnier, 2008/03/13
- Re: very slow archive-mode, YAMAMOTO Mitsuharu, 2008/03/13
- Re: very slow archive-mode, Kenichi Handa, 2008/03/13
- Re: very slow archive-mode, YAMAMOTO Mitsuharu, 2008/03/14
- Re: very slow archive-mode, Juri Linkov, 2008/03/13
- Re: very slow archive-mode, Kenichi Handa, 2008/03/15
- Re: very slow archive-mode, Juri Linkov, 2008/03/16