@papyrus-sdk/ui-react-native 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -0
- package/dist/index.js +1356 -301
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1401 -320
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,3 +33,29 @@ await engine.load({ type: 'pdf', source: { uri: 'https://example.com/book.pdf' }
|
|
|
33
33
|
style={{ width: 120, height: 180 }}
|
|
34
34
|
/>
|
|
35
35
|
```
|
|
36
|
+
|
|
37
|
+
## Mobile Performance Baseline (Audit Step)
|
|
38
|
+
|
|
39
|
+
Enable runtime diagnostics before rendering the viewer:
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
(globalThis as any).__PAPYRUS_MOBILE_PERF__ = {
|
|
43
|
+
enabled: true,
|
|
44
|
+
sampleMemory: true,
|
|
45
|
+
};
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
With diagnostics enabled, the native viewer emits structured logs such as:
|
|
49
|
+
|
|
50
|
+
- `[Papyrus Perf][Viewer] document.ready` with initial load time.
|
|
51
|
+
- `[Papyrus Perf][Viewer] scroll.*` with frame-gap and dropped-frame estimates.
|
|
52
|
+
- `[Papyrus Perf][RightSheet] memory.thumbnails.*` for memory snapshots when opening thumbnails.
|
|
53
|
+
- `[Papyrus Perf][CoreStore] setDocumentState.burst` when state updates happen in bursts.
|
|
54
|
+
|
|
55
|
+
Recommended baseline run:
|
|
56
|
+
|
|
57
|
+
1. Load a large PDF (1000+ pages).
|
|
58
|
+
2. Record `document.ready` for initial load.
|
|
59
|
+
3. Scroll quickly for 10-15 seconds and capture `scroll.*` logs.
|
|
60
|
+
4. Open thumbnails and capture `memory.thumbnails.*`.
|
|
61
|
+
5. Jump between distant pages and check for `setDocumentState.burst`.
|