Content Hash Cache

During a directory comparison, file pairs whose size and timestamp do not already decide the result are compared by content: Diffoniq reads both files in the background and computes a fast checksum of each (the per-row progress bars show this work). The result decides whether the pair is displayed as equal or different. Esc stops a running check — on a slow network share you may not want to wait for all of it — and the pairs it had not reached are shown as unverified rather than guessed.

These checksums are stored in a small local database (hashcache.db, located next to diffoniq.ini — a portable installation keeps the cache portable too). On a repeat comparison, files whose size and modification time are unchanged are not read again; their checksum comes from the cache. A repeat comparison of the same large tree therefore finishes in a fraction of the first run’s time, even across program restarts.

A cache entry is discarded automatically as soon as a file’s size or modification time changes. The one case this cannot detect is a file whose contents changed while size and timestamp were preserved (some backup and synchronization tools do this) — use Re-verify Contents Ctrl+F5 to force a full re-read and rebuild the cache.

The Clear Hash Cache item in the Options menu empties the database completely.

Settings

These entries in diffoniq.ini control the cache and the background hashing:

HashCache=1 Enables the cache (default). Set to 0 to disable it completely — contents are then re-read on every comparison.
HashCacheMax=500000 Maximum number of cached entries (default 500 000 ≈ 75 MB). When exceeded, the least recently used entries are pruned. 0 means unlimited (no pruning).
BgdThreads=0 Number of background hashing threads. 0 (default) picks the count automatically: half the processor cores (at most 8) for local disks, and 16 as soon as one side of the comparison lives on a network share — there the per-file network round-trips dominate and more parallel requests hide the latency. Set an explicit value (1–64) only if the automatic choice does not fit your setup.