unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#25197: 26.0.50; notifications-notify is extremely slow
@ 2016-12-13 22:59 Peter Münster
  2017-09-02 12:15 ` Eli Zaretskii
  2021-09-03  8:55 ` bug#25197: 26.0.50; notifications-notify is extremely slow with double buffering Lars Ingebrigtsen
  0 siblings, 2 replies; 12+ messages in thread
From: Peter Münster @ 2016-12-13 22:59 UTC (permalink / raw)
  To: 25197

Hello,

Since

commit c29071587c64efb30792bd72248d3c791abd9337
Author: Daniel Colascione <dancol@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





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25197: 26.0.50; notifications-notify is extremely slow
  2016-12-13 22:59 bug#25197: 26.0.50; notifications-notify is extremely slow Peter Münster
@ 2017-09-02 12:15 ` Eli Zaretskii
  2017-09-03 10:51   ` Peter Münster
  2021-09-03  8:55 ` bug#25197: 26.0.50; notifications-notify is extremely slow with double buffering Lars Ingebrigtsen
  1 sibling, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2017-09-02 12:15 UTC (permalink / raw)
  To: Peter Münster; +Cc: 25197

> From: Peter Münster <pmlists@free.fr>
> Date: Tue, 13 Dec 2016 23:59:59 +0100
> Cc: dancol@dancol.org
> 
> Since
> 
> commit c29071587c64efb30792bd72248d3c791abd9337
> Author: Daniel Colascione <dancol@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)))

?





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25197: 26.0.50; notifications-notify is extremely slow
  2017-09-02 12:15 ` Eli Zaretskii
@ 2017-09-03 10:51   ` Peter Münster
  0 siblings, 0 replies; 12+ messages in thread
From: Peter Münster @ 2017-09-03 10:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 25197

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





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25197: 26.0.50; notifications-notify is extremely slow with double buffering
  2016-12-13 22:59 bug#25197: 26.0.50; notifications-notify is extremely slow Peter Münster
  2017-09-02 12:15 ` Eli Zaretskii
@ 2021-09-03  8:55 ` Lars Ingebrigtsen
  2021-09-06 20:21   ` Peter Münster
  1 sibling, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-03  8:55 UTC (permalink / raw)
  To: Peter Münster; +Cc: 25197

Peter Münster <pmlists@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





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25197: 26.0.50; notifications-notify is extremely slow with double buffering
  2021-09-03  8:55 ` bug#25197: 26.0.50; notifications-notify is extremely slow with double buffering Lars Ingebrigtsen
@ 2021-09-06 20:21   ` Peter Münster
  2021-09-07  5:33     ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Peter Münster @ 2021-09-06 20:21 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 25197

[-- Attachment #1: Type: text/plain, Size: 1110 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25197: 26.0.50; notifications-notify is extremely slow with double buffering
  2021-09-06 20:21   ` Peter Münster
@ 2021-09-07  5:33     ` Eli Zaretskii
  2021-09-07 13:19       ` Peter Münster
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2021-09-07  5:33 UTC (permalink / raw)
  To: Peter Münster; +Cc: larsi, 25197

> From: Peter Münster <pm@a16n.net>
> Date: Mon, 06 Sep 2021 22:21:04 +0200
> Cc: 25197@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?






^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25197: 26.0.50; notifications-notify is extremely slow with double buffering
  2021-09-07  5:33     ` Eli Zaretskii
@ 2021-09-07 13:19       ` Peter Münster
  2021-09-14 15:58         ` Peter Münster
  0 siblings, 1 reply; 12+ messages in thread
From: Peter Münster @ 2021-09-07 13:19 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: larsi, 25197

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25197: 26.0.50; notifications-notify is extremely slow with double buffering
  2021-09-07 13:19       ` Peter Münster
@ 2021-09-14 15:58         ` Peter Münster
  2021-09-15  8:01           ` Lars Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Peter Münster @ 2021-09-14 15:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: larsi, 25197

[-- Attachment #1: Type: text/plain, Size: 623 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25197: 26.0.50; notifications-notify is extremely slow with double buffering
  2021-09-14 15:58         ` Peter Münster
@ 2021-09-15  8:01           ` Lars Ingebrigtsen
  2021-09-15 12:24             ` Peter Münster
  0 siblings, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-15  8:01 UTC (permalink / raw)
  To: Peter Münster; +Cc: 25197

Peter Münster <pm@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





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25197: 26.0.50; notifications-notify is extremely slow with double buffering
  2021-09-15  8:01           ` Lars Ingebrigtsen
@ 2021-09-15 12:24             ` Peter Münster
  2021-09-16 12:23               ` Lars Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Peter Münster @ 2021-09-15 12:24 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 25197

[-- Attachment #1: Type: text/plain, Size: 233 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25197: 26.0.50; notifications-notify is extremely slow with double buffering
  2021-09-15 12:24             ` Peter Münster
@ 2021-09-16 12:23               ` Lars Ingebrigtsen
  2021-09-16 13:56                 ` Peter Münster
  0 siblings, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-16 12:23 UTC (permalink / raw)
  To: Peter Münster; +Cc: 25197

Peter Münster <pm@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





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#25197: 26.0.50; notifications-notify is extremely slow with double buffering
  2021-09-16 12:23               ` Lars Ingebrigtsen
@ 2021-09-16 13:56                 ` Peter Münster
  0 siblings, 0 replies; 12+ messages in thread
From: Peter Münster @ 2021-09-16 13:56 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 25197


[-- Attachment #1.1: Type: text/plain, Size: 404 bytes --]

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

[-- Attachment #1.2: emacs-notifications.jpg --]
[-- Type: image/jpeg, Size: 169614 bytes --]

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-09-16 13:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-13 22:59 bug#25197: 26.0.50; notifications-notify is extremely slow Peter Münster
2017-09-02 12:15 ` Eli Zaretskii
2017-09-03 10:51   ` Peter Münster
2021-09-03  8:55 ` bug#25197: 26.0.50; notifications-notify is extremely slow with double buffering Lars Ingebrigtsen
2021-09-06 20:21   ` Peter Münster
2021-09-07  5:33     ` Eli Zaretskii
2021-09-07 13:19       ` Peter Münster
2021-09-14 15:58         ` Peter Münster
2021-09-15  8:01           ` Lars Ingebrigtsen
2021-09-15 12:24             ` Peter Münster
2021-09-16 12:23               ` Lars Ingebrigtsen
2021-09-16 13:56                 ` Peter Münster

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).