Closed rbuj closed 4 years ago
Test
$ gsettings get org.mate.thumbnail-cache maximum-age 180 $ gsettings set org.mate.thumbnail-cache maximum-age 1 $ find ~/.cache/thumbnails -type f -name *.png -exec touch -d "-1 day" {} +
CPU profiling:
diff --git a/configure.ac b/configure.ac index d4028cd..b4f3e45 100644 --- a/configure.ac +++ b/configure.ac @@ -401,7 +401,7 @@ AC_ARG_ENABLE(more-warnings, AC_MSG_CHECKING(for more warnings) if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then AC_MSG_RESULT(yes) - CFLAGS="\ + CFLAGS="-lprofiler \ -Wall \ -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \ -Wnested-externs -Wpointer-arith \
# Build & run CFLAGS="-lprofiler" LDFLAGS="-lprofiler" ./autogen.sh --prefix=/usr --enable-more-warnings && make V=1 && sudo make install CPUPROFILE=/tmp/profile /usr/libexec/mate-settings-daemon --replace # Force thumbnail-cache purge gsettings set org.mate.thumbnail-cache maximum-age -1 find ~/.cache/thumbnails -type f -name *.png -exec touch -d "-1 day" {} + gsettings set org.mate.thumbnail-cache maximum-age 1 (wait 2 min and check ~/.cache/thumbnails/normal is empty) # Stop profiling /usr/libexec/mate-settings-daemon --replace # Show output pprof --pdf --focus=purge_thumbnail_cache /usr/libexec/mate-settings-daemon /tmp/profile > out.pdf pprof --svg --focus=purge_thumbnail_cache /usr/libexec/mate-settings-daemon /tmp/profile > out.svg
No problems with this PR after testing it several weeks.
Test
CPU profiling:
Before
After