all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: npostavs@users.sourceforge.net
Cc: 25122@debbugs.gnu.org
Subject: bug#25122: 24.5; function describe-variable hangs on large variables
Date: Wed, 26 Apr 2017 05:57:47 +0200	[thread overview]
Message-ID: <87d1bzlt1g.fsf@drachen> (raw)
In-Reply-To: <87mvb8paeg.fsf@users.sourceforge.net> (npostavs's message of "Sat, 22 Apr 2017 14:25:27 -0400")

Hi Noam,

> > I intend to close this bug as fixed after merging these, as this does
> > fix the performance bug.

I have a question: how much performance gain can I expect from your
changes?

My use case is the following: "el-search" has now an occur-like
operation mode.  It copies all matches (i.e. s-expressions) into an *El
Occur* buffer.  Matches can be tiny (like `1') or arbitrarily large.

Since most expressions don't start at column 0 in their source buffer
(unless they are top-level), I have to remove the amount of additional
indentation from all but the first line of a match.  Well - not from
all, that's where it gets complicated - there are cases where this is
wrong, like in strings and some comments.

To have a sane solution, I just used `indent-region' to reindent the
expression in the occur buffer.  This works great, but `indent-region'
was so slow that it took up to 50 percent of the whole running time of
the occur search.

With an naive alternative approach (just remove additional indentation
from lines where it makes sense (whereby finding out whether it "makes
sense" involves running syntax scanning)), I get an improvement of a
factor around five or ten relative to `indent-region' for reindenting.

Would you expect your improved `indent-region' is fast enough now so
that it makes sense that I switch back to it in my code?  Is the running
time now something close to O(number of lines to indent)?


Thanks,

Michael.





  reply	other threads:[~2017-04-26  3:57 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-06  2:21 bug#25122: 24.5; function describe-variable hangs on large variables Boruch Baum
2016-12-06  6:41 ` Thierry Volpiatto
2016-12-07  3:50   ` npostavs
2016-12-07  8:58     ` Thierry Volpiatto
2017-03-11  5:40       ` npostavs
2017-03-11 15:33         ` Stefan Monnier
2017-03-11 19:29           ` Thierry Volpiatto
2017-03-11 21:59             ` npostavs
2017-03-11 23:55               ` Drew Adams
2017-03-12  5:57               ` Thierry Volpiatto
2017-03-12 14:07                 ` Stefan Monnier
2017-03-12 14:15                 ` npostavs
2017-03-12 14:59                   ` Drew Adams
2017-03-12 16:29                   ` Stefan Monnier
2017-03-12 16:32                   ` npostavs
2017-03-13  4:47                     ` npostavs
2017-03-13 14:01                       ` npostavs
2017-03-16  2:54                         ` npostavs
2017-04-18  3:53                           ` npostavs
2017-04-22 18:25                             ` npostavs
2017-04-26  3:57                               ` Michael Heerdegen [this message]
2017-04-26 10:35                                 ` Michael Heerdegen
2017-03-11 19:34         ` Thierry Volpiatto
2017-03-12 16:07           ` npostavs
2017-03-11 15:21   ` Stefan Monnier
2017-03-11 15:35     ` npostavs
2017-03-11 19:26     ` Thierry Volpiatto

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d1bzlt1g.fsf@drachen \
    --to=michael_heerdegen@web.de \
    --cc=25122@debbugs.gnu.org \
    --cc=npostavs@users.sourceforge.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.