Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notification shown very slow #51

Open
liudonghua123 opened this issue Jun 2, 2023 · 0 comments
Open

notification shown very slow #51

liudonghua123 opened this issue Jun 2, 2023 · 0 comments

Comments

@liudonghua123
Copy link

liudonghua123 commented Jun 2, 2023

Hi, I tried this package on my windows 11 computer, I have python 3.11 and the latest notifypy 0.3.42 installed. I tried to show a simple notification by both cli and code. Both of them very slow, about half a minute until the notification shown. And in the later tests, it used about 16 seconds.

notifypy --title hello --message "nice to meet you" --applicationName "notifypy"
>>> from notifypy import Notify
>>>
>>> notification = Notify()
>>> notification.title = "Cool Title"
>>> notification.message = "Even cooler message."
>>> notification.send()
True
>>> import notifypy
>>> notifypy.__version__
'0.3.42'
>>>
>>> import time
>>> from notifypy import Notify
>>> notification = Notify()
>>> notification.title = "Cool Title"
>>> notification.message = "Even cooler message."
>>> start = time.perf_counter(); notification.send(); print(f"Elapsed {time.perf_counter() - start:.03f} seconds.")
True
Elapsed 41.283 seconds.
>>> # In the later test
>>> start = time.perf_counter(); notification.send(); print(f"Elapsed {time.perf_counter() - start:.03f} seconds.")
True
Elapsed 15.669 seconds.
>>> start = time.perf_counter(); notification.send(); print(f"Elapsed {time.perf_counter() - start:.03f} seconds.")
True
Elapsed 15.697 seconds.
>>> start = time.perf_counter(); notification.send(); print(f"Elapsed {time.perf_counter() - start:.03f} seconds.")
True
Elapsed 15.695 seconds.
>>> start = time.perf_counter(); notification.send(); print(f"Elapsed {time.perf_counter() - start:.03f} seconds.")
True
Elapsed 15.664 seconds.
>>>
>>> from timeit import timeit
>>> timeit("notification.send()", globals=globals(), number=2)
31.34698849997949
>>>

I also tried plyer.notification, it is very quickly, about one or two seconds only.

>>> from plyer import notification
>>> notification.notify("hello", "nice to meet you", "plyer")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant