emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: very slow archive-mode


From: YAMAMOTO Mitsuharu
Subject: Re: very slow archive-mode
Date: Fri, 14 Mar 2008 10:56:14 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Thu, 13 Mar 2008 11:08:52 -0400, Stefan Monnier <address@hidden> said:

>>> 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:

> Also, IIUC the 8-bit bytes that are not represented as a single byte
> and not only more numerous, but they also take up more space (they
> used to take up just 2 bytes but now they take up what 3? 4? 5
> bytes?).

IIUC, it still takes up just 2 bytes by cleverly using vacant UTF-8
area (see character.h).

I think code_convert_region in Emacs 22 tried to avoid the repeated
reallocations and copies by estimating the necessary buffer size from
the intermediate result of conversion in progress. (And there were a
cast problem that affected its performance:
http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-12/msg00197.html)

Does the code conversion in Emacs 23 include such estimation?

                                     YAMAMOTO Mitsuharu
                                address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]