bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#122: 23.0.60; Slowdown in directory scanning over time.


From: Stefan Monnier
Subject: bug#122: 23.0.60; Slowdown in directory scanning over time.
Date: Wed, 17 Sep 2008 12:02:06 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> The slowness came from the inefficiency of
> generate-new-buffer-name when there exist many buffers of
> the same base name.  To generate the 201th buffer, it scans
> the buffer list 200 times (comparing names 200*201/2 = 20100
> times), and the following get-buffer-create scans it again.

Oh, yes, of course.  When generate-new-buffer-name is called for
a user-visible buffer, fixing this would be probably too much trouble
for too little benefit.  But for internal buffers, whose precise name
doesn't actually matter, we should use a different strategy, where we
immediately start by adding a random suffix to the buffer name, so as to
avoid conflicts.


        Stefan






reply via email to

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