Jonas Jenwald
5f295ba280
Improve caching in Catalog.getPageDict (PR 8207 follow-up)
...
PR 8207 added caching to improve the performance of `Catalog.getPageDict`, by not having to repeatedly fetch the same data and also reducing the asynchronicity of that method.
However, because of annoying off-by-one errors[1] the caching became less efficient than it could/should be.[2] Note here that the /Pages-tree is zero-indexed, and that e.g. `pageIndex = 5` thus correspond to the *sixth* page of the document.
---
[1] In particular the `currentPageIndex + count < pageIndex` part.
[2] For example, even when loading a relatively small/simple document such as `tracemonkey.pdf` in the viewer, the number of `xref.fetchAsync(currentNode)` calls are reduced from `56` to `44` with this patch.
2021-12-06 11:49:31 +01:00
..
2021-11-27 11:32:32 -08:00
2021-03-13 16:12:53 +01:00
2021-11-12 15:37:33 +01:00
2020-10-03 20:15:29 +02:00
2021-07-04 15:23:56 +02:00
2021-07-04 15:23:56 +02:00
2021-05-01 19:20:36 +02:00
2021-11-03 20:31:57 +01:00
2021-07-28 19:10:42 +02:00
2021-12-06 11:49:31 +01:00
2021-04-28 10:16:51 +02:00
2021-04-27 13:29:09 +02:00
2021-06-07 11:10:11 -07:00
2021-07-04 12:57:45 +02:00
2021-01-09 20:37:51 +01:00
2021-11-24 19:19:43 +01:00
2021-10-24 13:48:38 +02:00
2021-11-14 10:48:50 +01:00
2021-12-02 14:31:04 +01:00
2021-10-26 23:42:04 +10:00
2021-07-26 16:42:50 +02:00
2021-04-28 10:16:51 +02:00
2021-04-01 16:47:30 +02:00
2021-12-02 14:31:04 +01:00
2021-01-09 20:37:51 +01:00
2021-11-20 12:20:55 +01:00
2021-08-03 11:14:49 +02:00
2021-05-19 11:36:03 +02:00
2021-05-25 13:54:46 +02:00
2021-06-07 11:10:11 -07:00
2021-10-13 07:37:14 -04:00
2021-07-24 12:59:53 +02:00
2021-07-04 12:57:45 +02:00
2021-02-27 12:46:57 +01:00
2021-07-28 19:10:42 +02:00
2021-08-18 12:49:01 +02:00
2021-11-10 11:56:18 +01:00
2021-04-28 13:44:47 +02:00
2021-08-10 11:27:47 +02:00
2021-11-10 11:56:18 +01:00
2021-11-14 10:48:50 +01:00
2021-04-28 13:44:47 +02:00
2021-08-31 11:44:26 +08:00
2021-07-28 19:10:42 +02:00
2021-04-28 10:16:51 +02:00
2021-02-17 13:12:01 +01:00
2021-02-27 12:44:45 +01:00
2020-10-26 16:27:33 +01:00
2021-07-28 19:10:42 +02:00
2021-05-21 15:48:37 +02:00
2021-04-28 13:44:47 +02:00
2021-05-02 21:00:28 +02:00
2021-08-06 00:39:42 +02:00
2021-11-27 23:50:26 +01:00
2021-11-10 11:56:18 +01:00
2021-11-20 12:20:55 +01:00
2021-11-10 11:56:18 +01:00
2021-11-27 23:50:26 +01:00
2021-07-24 13:05:46 +02:00
2021-04-28 10:16:51 +02:00
2021-07-28 19:10:42 +02:00
2021-09-23 01:11:57 +02:00
2021-04-28 13:44:45 +02:00
2021-11-14 12:37:41 +01:00
2021-05-02 21:00:29 +02:00
2021-05-03 13:57:30 +02:00
2021-07-04 12:57:45 +02:00
2021-02-27 13:20:09 +01:00
2021-04-24 13:00:19 +02:00
2021-11-27 21:57:35 +01:00
2021-09-23 19:51:23 +02:00
2021-07-28 19:10:42 +02:00
2021-05-18 10:22:18 +02:00
2021-12-03 11:57:38 +01:00