2015-07-02
2015-07-02 09:17:08 by 0
-
41a5056d3d692d1a766dcdcca441913941c382d2
(16 lines)
(+10/-6)
[
Show
| Annotate
]
Branch: devel
Less debug noise if image cache cleaning had no effect.
4560: Inside #if defined(DEBUG) || defined(IMG_CACHE_DEBUG)
int num;
#if defined(DEBUG) || defined(IMG_CACHE_DEBUG)
int t = gethrtime();
- report_debug("Cleaning "+name+" image cache ... ");
+
#endif
sync_meta();
uid_cache = ([]);
rst_cache = ([]);
if( !age )
{
-
+ QUERY( "DELETE FROM "+name );
#if defined(DEBUG) || defined(IMG_CACHE_DEBUG)
- report_debug("cleared\n");
+ int msec = (gethrtime() - t) / 1000;
+ report_debug("Image cache %s emptied (%dms).\n", name, msec);
#endif
- QUERY( "DELETE FROM "+name );
+
num = -1;
return;
}
4607:
#endif
#if defined(DEBUG) || defined(IMG_CACHE_DEBUG)
- report_debug("%s removed (%dms)\n",
- (num==-1?"all":num?(string)num:"none"),
- (gethrtime()-t)/1000);
+ int msec = (gethrtime() - t) / 1000;
+ if (num || (msec > 500)) {
+ report_debug("Image cache %s cleaned: %s removed (%dms)\n",
+ name,
+ (num == -1 ? "all" : num ? (string) num : "none"), msec);
+ }
#endif
}