THPDFGraphTransactionStatistics Record
Snapshots the state of the copy-on-write graph transaction stack: active flag, nesting depth, snapshot and added-object counts, and resident, spilled and peak snapshot memory
Declaration
THPDFGraphTransactionStatistics= record
Active: boolean;
Depth: Integer;
SnapshotCount: Integer;
AddedObjectCount: Integer;
ResidentSnapshotBytes: Int64;
SpilledSnapshotBytes: Int64;
PeakResidentSnapshotBytes: Int64;
end;
Unit
HPDFDoc
Fields
| Field | Purpose |
|---|---|
Active | true whilst a transaction opened by BeginGraphTransaction is still open |
Depth | Number of nested transaction frames presently on the stack |
SnapshotCount | Copy-on-write object snapshots held across all frames |
AddedObjectCount | Indirect objects added since the outermost transaction began, measured against its initial object count |
ResidentSnapshotBytes | Snapshot bytes currently held in memory across all frames |
SpilledSnapshotBytes | Snapshot bytes moved out of memory by the spilling mechanism |
PeakResidentSnapshotBytes | Highest resident snapshot total observed; also reported when no transaction is in progress |
Usage notes
- Request it from
THotPDF.GetGraphTransactionStatisticsbetweenBeginGraphTransactionandCommitGraphTransactionorRollbackGraphTransactionto watch the rollback cost grow - When
Activeisfalsethe counters are zero apart fromPeakResidentSnapshotBytes, which keeps the last high-water mark - Use
ResidentSnapshotBytesplusSpilledSnapshotBytesto size memory budgets for lengthy editing sessions on large documents