! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Absence of eternal notifyd log file
Status:
RESOLVED: INVALID
Product:
Xfce4-notifyd
Component:
general

Comments

Description Jan Ziak (http://atom-symbol.net) 2020-05-06 19:18:05 CEST
Hello. I noticed that commit c2438cf8f1d284c154f430ae6202ac40ddaf5235 is introducing a limit on the number of entries in the log file. Having myself for example eternal history enabled in Bash ($HOME/.bash_eternal_history), I disagree with restricting xfce4-notifyd entries to any particular number, such as 100 or 1000 entries.

Since the log_max_size variable is already an integer (type: gint), it should be fairly straightforward to implement in C&Glade that the value of -1 means there is no limit to the number of entries in the log file.

I agree with the viewpoint that having a lot of entries in the log file, such as 10000+, is _currently_ a performance issue and a memory consumption issue. But this is only because the current implementation in xfce-notify-log.c is rewriting the whole log file every time a new notification arrives. A proper fix would be to open the log file in append mode. Even in the case of the new default, which is 100 entries, appending would be faster than rewriting by a factor of 100. Unfortunately, GLib's key-value file parser has no support for opening the file in append mode.
Comment 1 Jan Ziak (http://atom-symbol.net) 2020-05-06 19:21:50 CEST
Related bug: bug 14865
Comment 2 Simon Steinbeiss editbugs 2020-05-06 19:24:09 CEST
You should have read the tooltip, setting it to 0 means no limit
Comment 3 Jan Ziak (http://atom-symbol.net) 2020-05-06 19:29:29 CEST
(In reply to Simon Steinbeiss from comment #2)
> You should have read the tooltip, setting it to 0 means no limit

Cool. Thanks.

However, the performance issues remain if there is no limit. Is there a plan to switch the implementation to use append mode when updating the log file in the near future?
Comment 4 Simon Steinbeiss editbugs 2020-05-06 19:44:08 CEST
Well I also didn't close that other bugreport, did I? :)

Yeah, would be nice to get that fixed (patches welcome!)

Bug #16808

Reported by:
Jan Ziak (http://atom-symbol.net)
Reported on: 2020-05-06
Last modified on: 2020-05-06

People

Assignee:
Simon Steinbeiss
CC List:
0 users

Version

Attachments

Additional information