From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Markus Triska Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#496: 23.0.60; ispell-word becomes increasingly slower Date: Sat, 28 Jun 2008 17:21:52 +0200 Message-ID: References: <20080628002655.A4921924848@mt-computer.local> Reply-To: Markus Triska , 496@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1214668052 19710 80.91.229.12 (28 Jun 2008 15:47:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Jun 2008 15:47:32 +0000 (UTC) Cc: 496@emacsbugs.donarmstrong.com, emacs-pretest-bug@gnu.org, bug-gnu-emacs@gnu.org, bug-submit-list@donarmstrong.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 28 17:48:17 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KCcet-0002Xr-0Y for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Jun 2008 17:48:15 +0200 Original-Received: from localhost ([127.0.0.1]:49960 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KCce3-0006Jy-3R for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Jun 2008 11:47:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KCcdx-0006JY-V0 for bug-gnu-emacs@gnu.org; Sat, 28 Jun 2008 11:47:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KCcdv-0006Ip-2S for bug-gnu-emacs@gnu.org; Sat, 28 Jun 2008 11:47:17 -0400 Original-Received: from [199.232.76.173] (port=49072 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KCcdu-0006Ik-TT for bug-gnu-emacs@gnu.org; Sat, 28 Jun 2008 11:47:14 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:45963) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KCcdu-0001Oo-Bp for bug-gnu-emacs@gnu.org; Sat, 28 Jun 2008 11:47:14 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5SFlBah027279; Sat, 28 Jun 2008 08:47:12 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m5SFU64P022822; Sat, 28 Jun 2008 08:30:06 -0700 X-Loop: don@donarmstrong.com Resent-From: Markus Triska Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 28 Jun 2008 15:30:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 496 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.121466653321403 (code B ref -1); Sat, 28 Jun 2008 15:30:05 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 28 Jun 2008 15:22:13 +0000 Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5SFM6nn021384 for ; Sat, 28 Jun 2008 08:22:07 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KCcFa-0002ta-58 for bug-gnu-emacs@gnu.org; Sat, 28 Jun 2008 11:22:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KCcFU-0002sf-Mh for bug-gnu-emacs@gnu.org; Sat, 28 Jun 2008 11:22:05 -0400 Original-Received: from [199.232.76.173] (port=43130 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KCcFU-0002sc-IS for bug-gnu-emacs@gnu.org; Sat, 28 Jun 2008 11:22:00 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:55516) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KCcFU-0006yd-6M for bug-gnu-emacs@gnu.org; Sat, 28 Jun 2008 11:22:00 -0400 Original-Received: (qmail invoked by alias); 28 Jun 2008 15:21:59 -0000 Original-Received: from pnsgw1-client184.demo.tuwien.ac.at (EHLO pnsgw1-client184.demo.tuwien.ac.at) [128.131.200.184] by mail.gmx.net (mp046) with SMTP; 28 Jun 2008 17:21:59 +0200 X-Authenticated: #4064391 X-Provags-ID: V01U2FsdGVkX1+PHWNOIp+PBX3mshMXSImVuAEQV9V+TSZl75dO1O lsuMi3rX+zIDP3 Original-Received: by pnsgw1-client184.demo.tuwien.ac.at (Postfix, from userid 502) id 17B1A9296D4; Sat, 28 Jun 2008 17:21:52 +0200 (CEST) In-Reply-To: (Eli Zaretskii's message of "Sat, 28 Jun 2008 18:04:02 +0300") X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-CrossAssassin-Score: 3 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Sat, 28 Jun 2008 11:47:17 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:18560 gmane.emacs.pretest.bugs:22696 Archived-At: Eli Zaretskii writes: > your test.el shows a similar problem with Ispell. So either Aspell and > Ispell share the same problem, or Emacs still has something to do with > the slowdown. Aspell's maintainer Kevin Atkinson has generously sent me the following patch for Aspell that fixes the problem for me with the latest CVS version of Aspell. He says it will be in Aspell 0.60.7. Here's a simpler test case for the problem in versions up to 0.60.6: while true; do echo "-"; done | aspell -a Index: common/config.cpp =================================================================== RCS file: /sources/aspell/aspell/common/config.cpp,v retrieving revision 1.79 diff -u -r1.79 config.cpp --- common/config.cpp 12 Oct 2007 00:33:17 -0000 1.79 +++ common/config.cpp 28 Jun 2008 10:42:10 -0000 @@ -1000,7 +1000,7 @@ } assert(ki->def != 0); // if null this key should never have values - // directly added to it + // directly added to it String value(entry->action == Reset ? get_default(ki) : entry->value); switch (ki->type) { @@ -1027,11 +1027,13 @@ goto error; } + clear_others(entry); NOTIFY_ALL(item_updated(ki, val)); break; } case KeyInfoString: + clear_others(entry); NOTIFY_ALL(item_updated(ki, value)); break; @@ -1040,6 +1042,7 @@ int num; if (sscanf(value.str(), "%i", &num) == 1 && num >= 0) { + clear_others(entry); NOTIFY_ALL(item_updated(ki, num)); } else { pe = make_err(bad_value, entry->key, value, _("a positive integer")); @@ -1049,6 +1052,9 @@ break; } case KeyInfoList: + + if (entry->action == ListSet || entry->action == ListClear) + clear_others(entry); NOTIFY_ALL(list_updated(ki)); break; @@ -1064,6 +1070,26 @@ return (PosibErrBase &)pe; } + // Delete all previous entries with the same key + void Config::clear_others(Entry * entry) { + + String & key = entry->key; + //printf("Clear Others For %s\n", key.c_str()); + Entry * * cur = &first_; + while (*cur != entry) { + assert(*cur != *insert_point_); + if ((*cur)->key == key) { + //printf("JAP \"%s\"!\n", (*cur)->value.c_str()); + Entry * tmp = *cur; + *cur = (*cur)->next; + delete tmp; + } else { + cur = &(*cur)->next; + } + } + + } + #undef NOTIFY_ALL Index: common/config.hpp =================================================================== RCS file: /sources/aspell/aspell/common/config.hpp,v retrieving revision 1.27 diff -u -r1.27 config.hpp --- common/config.hpp 3 May 2005 05:08:19 -0000 1.27 +++ common/config.hpp 28 Jun 2008 10:42:10 -0000 @@ -132,6 +132,8 @@ PosibErr commit(Entry * entry, Conv * conv = 0); + void clear_others(Entry * entry); + bool settings_read_in_; public: