Commit 1c66a979 authored by Jim Nelson's avatar Jim Nelson

Reduce debug output of source pixbuf cache

Previous commit introduced more debug logging than is really
necessary.
parent aad834d2
...@@ -3270,16 +3270,12 @@ public abstract class Photo : PhotoSource, Dateable { ...@@ -3270,16 +3270,12 @@ public abstract class Photo : PhotoSource, Dateable {
// ...that's why the counter is incremented // ...that's why the counter is incremented
count++; count++;
} else if (elapsed >= SOURCE_PIXBUF_TIME_TO_LIVE_SEC) { } else if (elapsed >= SOURCE_PIXBUF_TIME_TO_LIVE_SEC) {
debug("Dropping expired source pixbuf for %s (%lf)", cached_pixbuf.photo.to_string(),
cached_pixbuf.last_touched.elapsed());
iter.remove(); iter.remove();
} else if (count >= SOURCE_PIXBUF_LRU_COUNT) { } else if (count >= SOURCE_PIXBUF_LRU_COUNT) {
debug("Dropping LRU source pixbuf for %s", cached_pixbuf.photo.to_string());
iter.remove(); iter.remove();
} else { } else {
// find the item with the most elapsed time to reschedule a cache trim // find the item with the least elapsed time to reschedule a cache trim (to
// prevent onesy-twosy reschedules)
min_elapsed = double.min(elapsed, min_elapsed); min_elapsed = double.min(elapsed, min_elapsed);
count++; count++;
} }
...@@ -3287,8 +3283,6 @@ public abstract class Photo : PhotoSource, Dateable { ...@@ -3287,8 +3283,6 @@ public abstract class Photo : PhotoSource, Dateable {
// if not found and trying to locate one and keep it, generate now // if not found and trying to locate one and keep it, generate now
if (found == null && locate != null && keep) { if (found == null && locate != null && keep) {
debug("Caching source pixbuf for %s", locate.to_string());
found = new CachedPixbuf(locate, found = new CachedPixbuf(locate,
locate.load_raw_pixbuf(Scaling.for_original(), Exception.ALL, BackingFetchMode.SOURCE)); locate.load_raw_pixbuf(Scaling.for_original(), Exception.ALL, BackingFetchMode.SOURCE));
} else if (found != null) { } else if (found != null) {
...@@ -3323,9 +3317,6 @@ public abstract class Photo : PhotoSource, Dateable { ...@@ -3323,9 +3317,6 @@ public abstract class Photo : PhotoSource, Dateable {
// round-up to avoid a bunch of zero-second timeouts // round-up to avoid a bunch of zero-second timeouts
uint retry_sec = SOURCE_PIXBUF_TIME_TO_LIVE_SEC - ((uint) Math.trunc(min_elapsed)); uint retry_sec = SOURCE_PIXBUF_TIME_TO_LIVE_SEC - ((uint) Math.trunc(min_elapsed));
debug("Rescheduling source pixbuf cache trim in %us (%d in cache)", retry_sec,
source_pixbuf_cache.size);
discard_source_id = Timeout.add_seconds(retry_sec, trim_source_pixbuf_cache, Priority.LOW); discard_source_id = Timeout.add_seconds(retry_sec, trim_source_pixbuf_cache, Priority.LOW);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment