GNU bug report logs - #25197
26.0.50; notifications-notify is extremely slow with double buffering

Previous Next

Package: emacs;

Reported by: Peter Münster <pmlists <at> free.fr>

Date: Tue, 13 Dec 2016 23:01:01 UTC

Severity: normal

Found in version 26.0.50

To reply to this bug, email your comments to 25197 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#25197; Package emacs. (Tue, 13 Dec 2016 23:01:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Peter Münster <pmlists <at> free.fr>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 13 Dec 2016 23:01:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Peter Münster <pmlists <at> free.fr>
To: bug-gnu-emacs <at> gnu.org
Cc: dancol <at> dancol.org
Subject: 26.0.50; notifications-notify is extremely slow
Date: Tue, 13 Dec 2016 23:59:59 +0100
Hello,

Since

commit c29071587c64efb30792bd72248d3c791abd9337
Author: Daniel Colascione <dancol <at> dancol.org>
Date:   Thu Oct 20 20:34:36 2016 -0700
    Add double-buffering support to reduce flicker

notifications-notify is extremely slow, when the notification windows
overlap the emacs window.

Command for testing:

time src/emacs -g 300x100 -Q --eval "(progn (require 'notifications)
             (dotimes (i 20) (notifications-notify :title \"TEST\"))
             (kill-emacs))"

Result before the commit:

real    0m1.820s
user    0m0.668s
sys     0m0.060s

Result after the commit:

real    0m11.782s
user    0m0.636s
sys     0m0.128s

"-g 300x100" or something similar is needed, to get a nearly full-screen
window, so that the notifications overlap the emacs window.

How could I speed up the notifications please?

TIA for any help,
-- 
           Peter




Added indication that bug 25197 blocks24655 Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 14 Dec 2016 16:44:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25197; Package emacs. (Sat, 02 Sep 2017 12:17:01 GMT) Full text and rfc822 format available.

Message #10 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Peter Münster <pmlists <at> free.fr>
Cc: bug-gnu-emacs <at> gnu.org, dancol <at> dancol.org
Subject: Re: 26.0.50; notifications-notify is extremely slow
Date: Sat, 02 Sep 2017 15:15:30 +0300
> From: Peter Münster <pmlists <at> free.fr>
> Date: Tue, 13 Dec 2016 23:59:59 +0100
> Cc: dancol <at> dancol.org
> 
> Since
> 
> commit c29071587c64efb30792bd72248d3c791abd9337
> Author: Daniel Colascione <dancol <at> dancol.org>
> Date:   Thu Oct 20 20:34:36 2016 -0700
>     Add double-buffering support to reduce flicker
> 
> notifications-notify is extremely slow, when the notification windows
> overlap the emacs window.
> 
> Command for testing:
> 
> time src/emacs -g 300x100 -Q --eval "(progn (require 'notifications)
>              (dotimes (i 20) (notifications-notify :title \"TEST\"))
>              (kill-emacs))"
> 
> Result before the commit:
> 
> real    0m1.820s
> user    0m0.668s
> sys     0m0.060s
> 
> Result after the commit:
> 
> real    0m11.782s
> user    0m0.636s
> sys     0m0.128s
> 
> "-g 300x100" or something similar is needed, to get a nearly full-screen
> window, so that the notifications overlap the emacs window.
> 
> How could I speed up the notifications please?

Daniel, could you please look into this issue?

Peter, does it help if you evaluate this:

  (modify-frame-parameters nil '((inhibit-double-buffering . t)))

?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25197; Package emacs. (Sun, 03 Sep 2017 10:52:02 GMT) Full text and rfc822 format available.

Message #13 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Peter Münster <pmlists <at> free.fr>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: bug-gnu-emacs <at> gnu.org, dancol <at> dancol.org
Subject: Re: 26.0.50; notifications-notify is extremely slow
Date: Sun, 03 Sep 2017 12:51:10 +0200
On Sat, Sep 02 2017, Eli Zaretskii wrote:

> Peter, does it help if you evaluate this:
>
>   (modify-frame-parameters nil '((inhibit-double-buffering . t)))

Yes, thanks!

Further information:

                                without i-d-b         with i-d-b
--------------------------------------------------------------------------
notification-daemon-0.5.0           0m11.474s           0m1.896s
mate-notification-daemon-1.18.0      0m4.940s           0m1.447s

I've switched from notification-daemon to mate-notification-daemon, so
it's kind of acceptable even without inhibit-double-buffering.

-- 
           Peter




Changed bug title to '26.0.50; notifications-notify is extremely slow with double buffering' from '26.0.50; notifications-notify is extremely slow' Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Sat, 25 Nov 2017 14:21:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25197; Package emacs. (Fri, 03 Sep 2021 08:56:02 GMT) Full text and rfc822 format available.

Message #18 received at 25197 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Peter Münster <pmlists <at> free.fr>
Cc: 25197 <at> debbugs.gnu.org, dancol <at> dancol.org
Subject: Re: bug#25197: 26.0.50; notifications-notify is extremely slow with
 double buffering
Date: Fri, 03 Sep 2021 10:55:44 +0200
Peter Münster <pmlists <at> free.fr> writes:

> notifications-notify is extremely slow, when the notification windows
> overlap the emacs window.
>
> Command for testing:
>
> time src/emacs -g 300x100 -Q --eval "(progn (require 'notifications)
>              (dotimes (i 20) (notifications-notify :title \"TEST\"))
>              (kill-emacs))"
>
> Result before the commit:
>
> real    0m1.820s
> user    0m0.668s
> sys     0m0.060s
>
> Result after the commit:
>
> real    0m11.782s
> user    0m0.636s
> sys     0m0.128s
>
> "-g 300x100" or something similar is needed, to get a nearly full-screen
> window, so that the notifications overlap the emacs window.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I tried reproducing this in Emacs 28 with various -g sizes, and I can't
see any particular slowness here:

real	0m0.334s
user	0m0.145s
sys	0m0.028s

Are you still seeing this issue in recent Emacs versions?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 03 Sep 2021 08:57:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25197; Package emacs. (Mon, 06 Sep 2021 20:22:02 GMT) Full text and rfc822 format available.

Message #23 received at 25197 <at> debbugs.gnu.org (full text, mbox):

From: Peter Münster <pm <at> a16n.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 25197 <at> debbugs.gnu.org, dancol <at> dancol.org
Subject: Re: bug#25197: 26.0.50; notifications-notify is extremely slow with
 double buffering
Date: Mon, 06 Sep 2021 22:21:04 +0200
[Message part 1 (text/plain, inline)]
On Fri, Sep 03 2021, Lars Ingebrigtsen wrote:

> Are you still seeing this issue in recent Emacs versions?

Hello Lars,

Yes, with version 27.2.

If you want, I can try with git-master, but at the moment I have some
problems:
  CCLD     temacs
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: alloc.o: in function `cleanup_vector':
/home/peter/tmp/emacs/src/alloc.c:3110: undefined reference to `mpz_clear'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: alloc.o: in function `make_pure_bignum':
/home/peter/tmp/emacs/src/alloc.c:5481: undefined reference to `mpz_size'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/peter/tmp/emacs/src/alloc.c:5492: undefined reference to `mpz_getlimbn'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/peter/tmp/emacs/src/alloc.c:5495: undefined reference to `mpz_sgn'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/peter/tmp/emacs/src/alloc.c:5498: undefined reference to `mpz_roinit_n'

-- 
           Peter
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25197; Package emacs. (Tue, 07 Sep 2021 05:34:01 GMT) Full text and rfc822 format available.

Message #26 received at 25197 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Peter Münster <pm <at> a16n.net>
Cc: larsi <at> gnus.org, 25197 <at> debbugs.gnu.org
Subject: Re: bug#25197: 26.0.50;
 notifications-notify is extremely slow with double buffering
Date: Tue, 07 Sep 2021 08:33:15 +0300
> From: Peter Münster <pm <at> a16n.net>
> Date: Mon, 06 Sep 2021 22:21:04 +0200
> Cc: 25197 <at> debbugs.gnu.org
> 
> If you want, I can try with git-master, but at the moment I have some
> problems:
>   CCLD     temacs
> /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: alloc.o: in function `cleanup_vector':
> /home/peter/tmp/emacs/src/alloc.c:3110: undefined reference to `mpz_clear'
> /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: alloc.o: in function `make_pure_bignum':
> /home/peter/tmp/emacs/src/alloc.c:5481: undefined reference to `mpz_size'
> /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/peter/tmp/emacs/src/alloc.c:5492: undefined reference to `mpz_getlimbn'
> /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/peter/tmp/emacs/src/alloc.c:5495: undefined reference to `mpz_sgn'
> /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/peter/tmp/emacs/src/alloc.c:5498: undefined reference to `mpz_roinit_n'

Looks like some problem with your GMP installation?  Perhaps you need
to install some development package of GMP, or upgrade the GMP you
have installed?  Or, if you don't have GMP installed, something went
wrong with compiling lib/mini-gmp.c?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25197; Package emacs. (Tue, 07 Sep 2021 13:20:01 GMT) Full text and rfc822 format available.

Message #29 received at 25197 <at> debbugs.gnu.org (full text, mbox):

From: Peter Münster <pm <at> a16n.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: larsi <at> gnus.org, 25197 <at> debbugs.gnu.org
Subject: Re: bug#25197: 26.0.50; notifications-notify is extremely slow with
 double buffering
Date: Tue, 07 Sep 2021 15:19:03 +0200
[Message part 1 (text/plain, inline)]
On Tue, Sep 07 2021, Eli Zaretskii wrote:

> Looks like some problem with your GMP installation?

Unfortunately I've no time to investigate further now. Perhaps in 2-3 weeks.

But it should be really easy to test this issue:

First you try this command with a geometry, that lets Emacs fill the
whole screen:

time emacs -g 500x200 -Q --eval "(progn (require 'notifications)
     (dotimes (i 20) (notifications-notify :title \"TEST\")) (kill-emacs))"

And then the same with a small Emacs frame like "-g 10x10".

With my installed version 27.2 the first example takes 9 seconds. The
latter less than 1 second.

My notification daemon is "mate-notification-daemon".

-- 
           Peter
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25197; Package emacs. (Tue, 14 Sep 2021 15:59:01 GMT) Full text and rfc822 format available.

Message #32 received at 25197 <at> debbugs.gnu.org (full text, mbox):

From: Peter Münster <pm <at> a16n.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: larsi <at> gnus.org, 25197 <at> debbugs.gnu.org
Subject: Re: bug#25197: 26.0.50; notifications-notify is extremely slow with
 double buffering
Date: Tue, 14 Sep 2021 17:58:32 +0200
[Message part 1 (text/plain, inline)]
On Tue, Sep 07 2021, Peter Münster wrote:

> With my installed version 27.2 the first example takes 9 seconds. The
> latter less than 1 second.

Now I've finally compiled Emacs from git-master:

time src/emacs -g 150x50 -Q --eval "(progn (require 'notifications) (dotimes (i 20) (notifications-notify :title \"TEST\")) (kill-emacs))"

real    0m0.505s
user    0m0.286s
sys     0m0.033s

time src/emacs -g 500x200 -Q --eval "(progn (require 'notifications) (dotimes (i 20) (notifications-notify :title \"TEST\")) (kill-emacs))"

real    0m4.287s
user    0m0.525s
sys     0m0.088s

-- 
           Peter
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25197; Package emacs. (Wed, 15 Sep 2021 08:02:02 GMT) Full text and rfc822 format available.

Message #35 received at 25197 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Peter Münster <pm <at> a16n.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 25197 <at> debbugs.gnu.org
Subject: Re: bug#25197: 26.0.50; notifications-notify is extremely slow with
 double buffering
Date: Wed, 15 Sep 2021 10:01:06 +0200
Peter Münster <pm <at> a16n.net> writes:

> time src/emacs -g 150x50 -Q --eval "(progn (require 'notifications)
> (dotimes (i 20) (notifications-notify :title \"TEST\")) (kill-emacs))"
>
> real    0m0.505s
> user    0m0.286s
> sys     0m0.033s
>
> time src/emacs -g 500x200 -Q --eval "(progn (require 'notifications)
> (dotimes (i 20) (notifications-notify :title \"TEST\")) (kill-emacs))"
>
> real    0m4.287s
> user    0m0.525s
> sys     0m0.088s

Just to check -- how long does

time src/emacs -g 500x200 -Q --eval "(kill-emacs)"

take?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25197; Package emacs. (Wed, 15 Sep 2021 12:25:01 GMT) Full text and rfc822 format available.

Message #38 received at 25197 <at> debbugs.gnu.org (full text, mbox):

From: Peter Münster <pm <at> a16n.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 25197 <at> debbugs.gnu.org
Subject: Re: bug#25197: 26.0.50; notifications-notify is extremely slow with
 double buffering
Date: Wed, 15 Sep 2021 14:24:26 +0200
[Message part 1 (text/plain, inline)]
On Wed, Sep 15 2021, Lars Ingebrigtsen wrote:

> Just to check -- how long does
>
> time src/emacs -g 500x200 -Q --eval "(kill-emacs)"
>
> take?

real    0m0.440s
user    0m0.267s
sys     0m0.045s

-- 
           Peter
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25197; Package emacs. (Thu, 16 Sep 2021 12:24:01 GMT) Full text and rfc822 format available.

Message #41 received at 25197 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Peter Münster <pm <at> a16n.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 25197 <at> debbugs.gnu.org
Subject: Re: bug#25197: 26.0.50; notifications-notify is extremely slow with
 double buffering
Date: Thu, 16 Sep 2021 14:23:41 +0200
Peter Münster <pm <at> a16n.net> writes:

>> Just to check -- how long does
>>
>> time src/emacs -g 500x200 -Q --eval "(kill-emacs)"
>>
>> take?
>
> real    0m0.440s
> user    0m0.267s
> sys     0m0.045s

Hm, I noticed now that my window manager (Gnome Shell) doesn't actually
respect the -g 500x200 -- it snaps the Emacs window back to a smaller
size if the window is bigger than the screen, so perhaps that's not why
I'm not able to reproduce the problem...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25197; Package emacs. (Thu, 16 Sep 2021 13:58:01 GMT) Full text and rfc822 format available.

Message #44 received at 25197 <at> debbugs.gnu.org (full text, mbox):

From: Peter Münster <pm <at> a16n.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 25197 <at> debbugs.gnu.org
Subject: Re: bug#25197: 26.0.50; notifications-notify is extremely slow with
 double buffering
Date: Thu, 16 Sep 2021 15:56:54 +0200
[Message part 1 (text/plain, inline)]
On Thu, Sep 16 2021, Lars Ingebrigtsen wrote:

> perhaps that's not why I'm not able to reproduce the problem...

I don't know. I guess, that these 2 points are important:
- The notification windows must overlap the Emacs window.
- Each notification must generate a new window. Like in attached
  screenshot.

Perhaps it depends also on the window manager. I use FVWM.

-- 
           Peter
[emacs-notifications.jpg (image/jpeg, attachment)]
[signature.asc (application/pgp-signature, inline)]

Removed tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 14 Oct 2021 15:13:01 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 244 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.