GNOME Bugzilla – Bug 788926
Video playback pauses/stutters while totem writes to ~/.config/totem/session_state.xspf
Last modified: 2017-10-19 07:56:52 UTC
Video playback pauses/stutters while totem writes to ~/.config/totem/session_state.xspf This happens frequently even when the video file being played is fully cached in RAM. strace says it was doing this: openat(AT_FDCWD, "/home/dan/.config/totem/.goutputstream-JQJD8Y", O_WRONLY|O_CREAT|O_EXCL, 0666) = 38 fchown(38, 1000, 1000) = 0 fchmod(38, 0100664) = 0 write(38, "<?xml version=\"1.0\" encoding=\"UT"..., 105) = 105 write(38, " <track>\n <location>file:///h"..., 95) = 95 write(38, " <title>Blender Foundation 200"..., 107) = 107 write(38, " <extension application=\"http:"..., 84) = 84 write(38, " <playing>true</playing>\n", 29) = 29 write(38, " </extension>\n", 16) = 16 write(38, " </track>\n", 11) = 11 write(38, " </trackList>\n</playlist>", 25) = 25 fsync(38) = 0 rename("/home/dan/.config/totem/.goutputstream-JQJD8Y", "/home/dan/.config/totem/session_state.xspf") = 0 fstat(38, {st_mode=S_IFREG|0664, st_size=472, ...}) = 0 close(38) and some debug output I've placed in clutter says there's a gap of over 200ms between frames when this happens. It's quite noticeable on-screen.
Maybe the fsync is excessive?
The fsync is run by g_file_set_contents(), not by totem itself. Thanks for taking the time to report this. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of bug 733780 ***
Actually the offending fsync is the other one - in _g_local_file_output_stream_really_close(). Confirmed also by the stack traces in bug 733780.