From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Michael Mauger <mmaug@yahoo.com>
Cc: Vitalie Spinu <spinuvit@gmail.com>, Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Deffering redisplay in COMINT
Date: Fri, 11 Jan 2013 10:55:49 -0500 [thread overview]
Message-ID: <jwvobgv67n5.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <1357915224.58763.YahooMailNeo@web160903.mail.bf1.yahoo.com> (Michael Mauger's message of "Fri, 11 Jan 2013 06:40:24 -0800 (PST)")
> but that's what I have to live with). Without the filter and
> auto-hscroll-mode engaged, the results take nearly 30 seconds to
> complete under Emacs. (It is nearly instantaneous outside of Emacs.)
> With the filter you suggest, the results take about 8-10 seconds with
> a noticeable stutter between each row. With the solution I had
> developed (buffering the long lines in a buffer and restoring them at
> the end of output), the results scroll by quickly in about 2-3 seconds,
> but then it hesitates at the end (as it restores the long lines in the
> buffer), for another 2-3 seconds. So just reducing the horizontal
> scrolling is giving us the big payback and the more complex
> gymnastics is probably not worth code cost.
Hmm... I'm wondering why the "one line at a time" approach ends up
slightly slower than your more complex approach. Using a single string
occurs an O(N^2) overhead (where N is the line length: we receive O(N)
packets per line and for each package we do a concat which costs O(N)),
so that might be the reason (which is why I suggested using a list of
strings, tho it makes detection of the prompt more cumbersome), but for
8KB lines it's not clear it would be that bad.
Could you M-x profiler-start ... M-x profiler-report around your tests
to see where the time is spent?
Stefan
next prev parent reply other threads:[~2013-01-11 15:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-07 1:08 Deffering redisplay in COMINT Michael Mauger
2012-12-25 11:09 ` Vitalie Spinu
2013-01-06 8:09 ` Michael Mauger
2013-01-08 18:19 ` Stefan Monnier
2013-01-11 14:40 ` Michael Mauger
2013-01-11 15:55 ` Stefan Monnier [this message]
2013-01-13 8:14 ` Michael Mauger
2013-01-13 16:46 ` Eli Zaretskii
2013-01-16 14:39 ` Stefan Monnier
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=jwvobgv67n5.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=mmaug@yahoo.com \
--cc=spinuvit@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 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).