From: Eli Zaretskii <eliz@gnu.org>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: 49127@debbugs.gnu.org, victor.nawothnig@icloud.com
Subject: bug#49127: Performance degradation in encode_coding_object
Date: Mon, 16 Aug 2021 20:43:20 +0300 [thread overview]
Message-ID: <83sfz970av.fsf@gnu.org> (raw)
In-Reply-To: <EC5DED64-8465-45A3-B20C-8D21F70E0A34@acm.org> (message from Mattias Engdegård on Mon, 16 Aug 2021 19:32:46 +0200)
> From: Mattias Engdegård <mattiase@acm.org>
> Date: Mon, 16 Aug 2021 19:32:46 +0200
> Cc: Eli Zaretskii <eliz@gnu.org>, 49127@debbugs.gnu.org
>
> It looks very much like haskell-mode is producing way too many markers, and that should be easily fixed (I wrote a tentative pull request). However, the code in encode_coding_object appears broken. Look at the first loop in that function:
>
> if (EQ (src_object, dst_object))
> {
> struct Lisp_Marker *tail;
>
> for (tail = BUF_MARKERS (current_buffer); tail; tail = tail->next)
> {
> tail->need_adjustment
> = tail->charpos == (tail->insertion_type ? from : to);
> need_marker_adjustment |= tail->need_adjustment;
> }
> }
>
> I don't know how this could ever work. We loop through the markers in the current buffer?
Yes. Why do you think this loop is broken?
> It is called from term.c with src_object and dst_object both being Qnil; no buffer is involved at all. At the very least the outer condition should have an "&& BUFFERP (dst_object)" added, and the loop should run through the markers of XBUFFER (dst_object) instead of current_buffer, no?
>
> `decode_coding_object` seem to get these things right but I only took a superficial look. It's probably copy-paste errors.
It isn't a copy/paste, I think it's a simple omission.
But if you look up-thread, you will see that I asked for xbacktrace
results from the OP, to make sure I completely understand the reasons
for the performance problem. I never got any responses for that. So
if you can produce the Lisp backtraces in that case, and later test a
fix, I'm quite sure I know how to fix this problem. TIA.
next parent reply other threads:[~2021-08-16 17:43 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <EC5DED64-8465-45A3-B20C-8D21F70E0A34@acm.org>
2021-08-16 17:43 ` Eli Zaretskii [this message]
2021-08-16 18:06 ` bug#49127: Performance degradation in encode_coding_object Mattias Engdegård
2021-08-16 18:50 ` Eli Zaretskii
2021-08-16 20:04 ` Mattias Engdegård
2021-08-17 12:34 ` Eli Zaretskii
2021-08-17 13:06 ` Mattias Engdegård
2021-08-17 14:05 ` Eli Zaretskii
2021-08-17 16:07 ` Mattias Engdegård
2021-08-17 17:16 ` Eli Zaretskii
2021-08-18 11:04 ` Mattias Engdegård
2021-08-18 11:43 ` Eli Zaretskii
2021-08-18 12:21 ` Mattias Engdegård
2021-08-18 13:23 ` Eli Zaretskii
2021-08-18 13:32 ` Mattias Engdegård
2021-08-18 13:39 ` Eli Zaretskii
2021-08-18 13:54 ` Mattias Engdegård
2021-08-18 13:59 ` Eli Zaretskii
2021-08-18 15:24 ` Mattias Engdegård
2021-08-18 14:34 ` Lars Ingebrigtsen
2021-08-20 23:24 ` Michael Welsh Duggan
2021-08-21 6:34 ` Eli Zaretskii
2021-06-20 6:30 Victor Nawothnig via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-20 9:04 ` Eli Zaretskii
2021-06-24 16:49 ` Eli Zaretskii
2021-07-25 7:10 ` Eli Zaretskii
2021-08-15 15:07 ` Eli Zaretskii
2021-08-17 12:35 ` Eli Zaretskii
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=83sfz970av.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=49127@debbugs.gnu.org \
--cc=mattiase@acm.org \
--cc=victor.nawothnig@icloud.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).