unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: asparagus@comcast.net
To: 19896@debbugs.gnu.org
Subject: bug#19896: 23.1; reverse-region is slow compared to sort-columns
Date: Wed, 18 Feb 2015 17:35:42 +0000 (UTC)	[thread overview]
Message-ID: <758739999.5853607.1424280942368.JavaMail.zimbra@comcast.net> (raw)
In-Reply-To: <1372534272.5818344.1424278471675.JavaMail.zimbra@comcast.net>

The emacs manual recommends 'M-x reverse-region' as a companion to 'M-x sort-columns' to achieve a descending-order column sort.  However, for large regions (>100k lines), 'M-x reverse-region' is noticeably slower than 'M-x sort-columns', making descending sort much slower than ascending sort.

A workaround on linux: use 'C-u M-x shell-command-on-region' with tac (the opposite of cat) instead of using 'M-x reverse-region'.

FROM THE MANUAL:
https://www.gnu.org/software/emacs/manual/html_node/emacs/Sorting.html
M-x reverse-region
    Reverse the order of the lines in the region. This is useful for sorting into descending order by fields or columns, since those sort commands do not have a feature for doing that.







       reply	other threads:[~2015-02-18 17:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1372534272.5818344.1424278471675.JavaMail.zimbra@comcast.net>
2015-02-18 17:35 ` asparagus [this message]
2015-02-18 18:29   ` bug#19896: 23.1; reverse-region is slow compared to sort-columns Ivan Shmakov
2015-02-18 19:01     ` Eli Zaretskii
2015-02-18 19:13       ` Ivan Shmakov
2015-02-18 19:29         ` Eli Zaretskii
     [not found]   ` <1358494426.5913572.1424285832847.JavaMail.zimbra@comcast.net>
2015-02-18 19:19     ` bug#19896: asparagus
     [not found]   ` <215096857.10629626.1424972910085.JavaMail.zimbra@comcast.net>
2015-02-26 17:53     ` bug#19896: Please modify documentation to close this bug asparagus
2015-04-19  0:49       ` Glenn Morris

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=758739999.5853607.1424280942368.JavaMail.zimbra@comcast.net \
    --to=asparagus@comcast.net \
    --cc=19896@debbugs.gnu.org \
    /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).