unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tino Calancha <tino.calancha@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: uyennhi.qm@gmail.com, 42911@debbugs.gnu.org
Subject: bug#42911: 28.0.50; write_region sometimes extremely very slow
Date: Tue, 25 Aug 2020 18:04:17 +0200	[thread overview]
Message-ID: <874koqsoe6.fsf@gmail.com> (raw)
In-Reply-To: <83lficfd1z.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 18 Aug 2020 13:44:56 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> Recipe:
>> emacs -Q ~/save-buffer-slow.txt
>> ;; insert few characters and run
>> M-: (benchmark-run nil (save-buffer))
>> 
>> ;; Repeat several times: sometimes it takes a reasonable time, but
>> ;; in others it takes huge time
>> ;; (6-10 s to save a buffer with less that 50 characters)
>> 
>> It happens randomly.
>
> Did you check that GC doesn't kick in when the "slow" saving happens?
`benchmark-run` lets you know teh number of GC and the time used by them
while running the form.  The reported slowliness was happening even
without GC.
I was curious if someone runnning opensuse Tumbleweed was seeing something similar.

I suspect this might be a problem of my OS (probably it was under heavy stress).
Now I am in vacation, and the computer seems more relax (same like me).  I have also
upgraded the OS and got a new kernel.

The following is data right now running this:
emacs -Q /tmp/save-slow-buffer.txt
;; evaluate the following key binding:

(global-set-key (kbd "<f5>") (lambda () (interactive) (print
(benchmark-run nil (save-buffer)) (current-buffer))))

;; now push <f5> slowly several times
;; Still seems a bit slow sometimes (~0.1 s) but it is acceptable for my needs:

(0.058208321 0 0.0)
(0.10882129 1 0.025746066999999928)
(0.051934588 0 0.0)
(0.068579962 0 0.0)
(0.066899402 0 0.0)
(0.078017127 0 0.0)
(0.078926675 0 0.0)
(0.117405042 0 0.0)
(0.04960965 0 0.0)
(0.043352053 0 0.0)
(0.086415222 0 0.0)
(0.064884219 0 0.0)
(0.06522908 0 0.0)
(0.058116398 0 0.0)
(0.109880304 0 0.0)
(0.049452437 0 0.0)
(0.10265914 0 0.0)
(0.080930332 0 0.0)
(0.298022584 0 0.0)
(0.067618432 0 0.0)
(0.059602676 0 0.0)
(0.0712565 0 0.0)
(0.066321402 0 0.0)
(0.062397403 0 0.0)
(0.16588965 0 0.0)
(0.123642695 0 0.0)
(0.055607216 0 0.0)
(0.070665992 0 0.0)
(0.087962897 0 0.0)
(0.179056865 0 0.0)
(0.084647328 0 0.0)
(0.152946603 0 0.0)
(0.074221478 0 0.0)
(0.0797594 0 0.0)
(0.117525087 0 0.0)
(0.068923711 0 0.0)
(0.074521989 0 0.0)
(0.074681374 0 0.0)
(0.202450873 0 0.0)
(0.102854426 0 0.0)
(0.083368982 0 0.0)
(0.074109755 0 0.0)
(0.070000116 0 0.0)
(0.065221696 0 0.0)
(0.077440244 0 0.0)





  reply	other threads:[~2020-08-25 16:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-18  9:46 bug#42911: 28.0.50; write_region sometimes extremely very slow Tino Calancha
2020-08-18 10:44 ` Eli Zaretskii
2020-08-25 16:04   ` Tino Calancha [this message]
2020-08-25 16:19     ` Eli Zaretskii
2021-07-23 20:13 ` Tino Calancha

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=874koqsoe6.fsf@gmail.com \
    --to=tino.calancha@gmail.com \
    --cc=42911@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=uyennhi.qm@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).