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 while a transaction opened by BeginGraphTransaction is still open |
Depth | Number of nested transaction frames currently on the stack |
SnapshotCount | Copy-on-write object snapshots held across all frames |
AddedObjectCount | Indirect objects added since the outermost transaction started, 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 active |
Usage notes
- Request it from
THotPDF.GetGraphTransactionStatisticsbetweenBeginGraphTransactionandCommitGraphTransactionorRollbackGraphTransactionto watch rollback cost grow - When
Activeisfalsethe counters are zero exceptPeakResidentSnapshotBytes, which keeps the last high-water mark - Use
ResidentSnapshotBytesplusSpilledSnapshotBytesto size memory budgets for long editing sessions on large documents