Overview: xfce4-notifyd is reading the whole ~/.cache/xfce4/notifyd/log file every time it shows a notification. Steps to Reproduce: 1) Wait until your ~/.cache/xfce4/notifyd/log file gets very big, for example by sending a lot of notifications in a loop from a script (it reached over 20MB in my case) 2) Run "notify-send Test" command Actual Results: It takes a noticeable fraction of a second to send a notification (0.2 seconds of more). Running xfce4-notifyd with strace shows that it's reading the whole ~/.cache/xfce4/notifyd/log file, which takes most of that time. Expected Results: What the application should have done, were the bug not present. Sending notifications shouldn't get slower with bigger notification log.
I guess you have the option enabled so that every notification is always logged? In this case yes, the file is touched every time a notification comes in because the new notification needs to get added. It's possible that since I'm (ab)using rc files for this purpose that this slows things down as opposed to classical file interactions (like stupidly appending text). Please test if performance is as normal if you disable the logging of notifications.
Yes, just disabling notification logging makes performance go back to normal. Initially I just renamed the file to get around this.
I suggest to resolve this issue by using g_key_file_to_data() to store the single newly arrived notification and appending the data to the log file via write() or fwrite().
Sounds plausible. Feel free to propose a merge request on gitlab. (I just enabled your account)
(In reply to Simon Steinbeiss from comment #4) > Feel free to propose a merge request on gitlab. (I just enabled your account) How is the transition to gitlab going? I added two notes to notifyd commits on gitlab, but I didn't see any info about to whom gitlab sent an e-mail notification. Did you receive those two notifications?
I didn't receive emails for your comments, but I noticed them in the activity tab. Not sure yet about the global notification scheme... I guess we still have to learn a bit about this new workflow, all of us (devs, contributors etc).
-- GitLab Migration Automatic Message -- This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/apps/xfce4-notifyd/-/issues/13. Please create an account or use an existing account on one of our supported OAuth providers. If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev