all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: contact@imrankhan.live, larsi@gnus.org
Cc: 48734@debbugs.gnu.org
Subject: bug#48734: 28.0.50; Performance regression in `string-width`?
Date: Mon, 31 May 2021 21:51:13 +0300	[thread overview]
Message-ID: <83lf7u20v2.fsf@gnu.org> (raw)
In-Reply-To: <837djf2d0j.fsf@gnu.org> (message from Eli Zaretskii on Mon, 31 May 2021 17:28:44 +0300)

> Date: Mon, 31 May 2021 17:28:44 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: larsi@gnus.org, 48734@debbugs.gnu.org
> 
> > (benchmark-run 1
> >   (let ((str))
> >     (with-temp-buffer
> >       (insert-file-contents "~/2591-0.txt")
> >       (setq str (string-replace "\n" " " (buffer-string))))
> >     (print (string-width str)))) ;;;; beware this now hangs
> > 
> > I waited a minute for it to finish before killing Emacs.
> 
> Why would someone want to measure the visible width of a 550KB string?
> Is that a real-life use case?
> 
> But I think I see the reason, and will try to improve this.

Turns out I completely misunderstood how find_automatic_composition
works (because its API is deceptively similar to that of
find_composition, and the crucial differences aren't documented).  So
I will need to restructure the code in lisp_string_width to deal
correctly with automatic compositions; stay tuned.





  reply	other threads:[~2021-05-31 18:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-29 20:45 bug#48734: 28.0.50; Performance regression in `string-width`? Imran Khan
2021-05-30  6:42 ` Eli Zaretskii
     [not found]   ` <87y2bwk1nj.fsf@teknik.io>
2021-05-30 10:00     ` Eli Zaretskii
2021-05-30 11:23       ` Imran Khan
2021-05-30 12:05         ` Eli Zaretskii
2021-05-30 12:18           ` Lars Ingebrigtsen
2021-05-30 13:32             ` Eli Zaretskii
2021-05-31  5:41               ` Lars Ingebrigtsen
2021-05-31 12:36                 ` Imran Khan
2021-05-31 14:28                   ` Eli Zaretskii
2021-05-31 18:51                     ` Eli Zaretskii [this message]
2021-06-05 11:20                       ` Eli Zaretskii
2021-06-05 15:25                         ` Imran Khan
2021-06-05 15:45                           ` 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

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

  git send-email \
    --in-reply-to=83lf7u20v2.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=48734@debbugs.gnu.org \
    --cc=contact@imrankhan.live \
    --cc=larsi@gnus.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 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.