THotPDF.PrefetchLoadedPages Method
Warms the loaded-page raster cache asynchronously without holding the render-cache lock during display-list compilation or playback
Declaration
procedure PrefetchLoadedPages(const PageRange: string= ''; DPI: Integer= 150);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageRange | One-based page range accepted by the standard page-range parser, or every loaded page when empty |
DPI | Raster resolution used for every scheduled cache entry, with invalid values replaced by 150 |
Return value
This member does not return a value
Usage notes
- Starting a new request cooperatively cancels and joins the previous request before scheduling the new page set
- Foreground calls to
RenderLoadedPageToBitmap,RenderLoadedPageToBitmapCached, andGetLoadedCachedRenderedBitmappreempt active prefetch work before rendering - Cancellation checkpoints run through content tokenization, display-list construction, and renderer playback, while individual codec, filter, source-read, and operating-system calls remain atomic
- Cache inspection and publication are serialized, but compilation and rasterization run outside the cache lock so background work does not monopolize foreground rendering
- A foreground cached render may copy an existing immutable memory-cache bitmap while cancellation completes; it acquires the normal memory reservation before copying and waits for logical worker completion before returning
- A foreground cache miss waits for worker completion before new document work; explicit cancellation, replacement, reload and destruction still join and release retained worker threads
- Do not modify or reload the document while a prefetch request is active