PDFium Delphi Component Docs

StructureCacheMissCount property

Component: TPdf  ·  Unit: PDFium
Counts structure element reads that had to parse the page structure tree

Syntax

property StructureCacheMissCount: Int64; // read only

Description

The counter increments once for every StructureElementsForPage or StructureElements access whose page slot is not valid, which happens on first access, after the entry was evicted by capacity pressure, after the page was edited and after a document reload resized the slot array

A miss triggers a fresh traversal with TPdfStructureReadOptions.Default. The result is stored only when the capacity is positive and the traversal completed; otherwise the parse repeats on the next access

The value is cumulative for the lifetime of the TPdf instance and never resets

Remarks

Reading is guarded by the render lock used by native PDFium page access

Lookups are never rejected: with retention disabled every access is a miss that still returns the freshly parsed elements

Pair the value with StructureCacheHitCount to compute the effective miss ratio

Example

Pdf.StructureCacheCapacity := 0;
Elements := Pdf.StructureElementsForPage[1];
Elements := Pdf.StructureElementsForPage[1];
// StructureCacheMissCount advanced twice, HitCount stayed unchanged
// StructureCacheMissCount advanced twice, HitCount stayed unchanged

See Also

StructureCacheHitCount, StructureCacheCount, StructureCacheCapacity, StructureElementsForPage