all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Simen Heggestøyl" <simenheg@gmail.com>
Cc: 37393@debbugs.gnu.org, sdl.web@gmail.com
Subject: bug#37393: 26.2.90; [PATCH] Speed up 'csv-align-fields'
Date: Tue, 17 Sep 2019 15:12:28 -0400	[thread overview]
Message-ID: <jwva7b2n3jc.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <5d810f73.1c69fb81.486b.2e0a@mx.google.com> ("Simen \=\?windows-1252\?Q\?Heggest\=F8yl\=22's\?\= message of "Tue, 17 Sep 2019 18:53:06 +0200")

>> Of the whole file?  No: instead you'd only use the max of the columns that
>> you've seen so far.  When it increases (thus invalidating
>> alignment-overlays already created), you just "flush" those overlays and
>> rebuild them.
> Wouldn't then the columns appear to jump about whenever a new max width
> is discovered?

Yes, but that should only happen as part of a scroll or similar
"significant" visual change anyway.

> I also guess you'd lose the ability to do e.g.
> C-u 1000 C-n and stay in the same column?

Probably, yes.  Seems like a minor issue to me.

>> Maybe we could get yet more speedup by making it possible to pass to
>> `current-column` (or a new C function) a start position along with its
>> column, so we'd avoid re-traversing the part of the line that we've
>> already processed.
> I think that sounds like a good idea; then my ugly "fast-current-column"

> Could this track be something worth exploring further?

Your call,


        Stefan






      parent reply	other threads:[~2019-09-17 19:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-12 17:07 bug#37393: 26.2.90; [PATCH] Speed up 'csv-align-fields' Simen Heggestøyl
2019-09-12 17:46 ` Stefan Monnier
2019-09-15 15:55   ` Simen Heggestøyl
2019-09-15 16:17     ` Eli Zaretskii
2019-09-15 18:43     ` Stefan Monnier
2019-09-17 16:53       ` Simen Heggestøyl
2019-09-17 17:23         ` Eli Zaretskii
2019-09-17 19:14           ` Stefan Monnier
2019-09-18  2:34             ` Eli Zaretskii
2019-09-18 19:59               ` Simen Heggestøyl
2019-09-18 20:08                 ` Stefan Monnier
2019-09-19 15:51                   ` Simen Heggestøyl
2019-09-19 17:30                     ` Eli Zaretskii
2019-10-09 16:33                       ` Simen Heggestøyl
2019-09-17 19:12         ` Stefan Monnier [this message]

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=jwva7b2n3jc.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=37393@debbugs.gnu.org \
    --cc=sdl.web@gmail.com \
    --cc=simenheg@gmail.com \
    /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.