unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: pogonyshev@gmx.net, emacs-devel@gnu.org, Kenichi Handa <handa@m17n.org>
Subject: Re: very slow archive-mode
Date: Fri, 14 Mar 2008 10:56:14 +0900	[thread overview]
Message-ID: <wl63vqhxvl.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <jwvtzjaslzg.fsf-monnier+emacs@gnu.org>

>>>>> On Thu, 13 Mar 2008 11:08:52 -0400, Stefan Monnier <monnier@iro.umontreal.ca> 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
				mituharu@math.s.chiba-u.ac.jp




  reply	other threads:[~2008-03-14  1:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-12 20:47 very slow archive-mode Paul Pogonyshev
2008-03-12 21:30 ` Stefan Monnier
2008-03-12 22:41   ` Juri Linkov
2008-03-13  7:51   ` Kenichi Handa
2008-03-13 15:04     ` Stefan Monnier
2008-03-13 15:08     ` Stefan Monnier
2008-03-14  1:56       ` YAMAMOTO Mitsuharu [this message]
2008-03-14  3:43         ` Kenichi Handa
2008-03-14  4:17           ` YAMAMOTO Mitsuharu
2008-03-14  1:03     ` Juri Linkov
2008-03-16  2:23       ` Kenichi Handa
2008-03-16 16:31         ` Juri Linkov

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=wl63vqhxvl.wl%mituharu@math.s.chiba-u.ac.jp \
    --to=mituharu@math.s.chiba-u.ac.jp \
    --cc=emacs-devel@gnu.org \
    --cc=handa@m17n.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=pogonyshev@gmx.net \
    /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).