Split out of #157. Nothing parses a region until somebody looks at it, so the map is always cold the first time it is opened after an update or on a world MSMS has not seen.
The two paths are far apart:
region parsed cold 1442 ms
region read from the cache 13 ms
A viewport is 4-9 regions, so first-open is seconds and re-open is well under a tenth of one. Walking the region directory in the background and parsing into the on-disk cache would make the common case the 13 ms path.
Constraints that matter:
- it must not fight the interactive queue — a visitor looking at the map has to win over the warmer
- it must respect
MapPerfConfig: cache: false means no warming at all, and cacheLimitMB still caps the result, so warming a world larger than the cap just evicts its own earlier work (decide whether to warm at all in that case, or warm nearest-to-spawn first)
- a big explored world is thousands of regions; this should be bounded and resumable rather than a startup stall
- ordering by region mtime, or by distance from spawn, is likely better than directory order
Sequence this after #160 — warming on the main thread would be the freeze this is meant to avoid, at a larger scale.
Split out of #157. Nothing parses a region until somebody looks at it, so the map is always cold the first time it is opened after an update or on a world MSMS has not seen.
The two paths are far apart:
A viewport is 4-9 regions, so first-open is seconds and re-open is well under a tenth of one. Walking the region directory in the background and parsing into the on-disk cache would make the common case the 13 ms path.
Constraints that matter:
MapPerfConfig:cache: falsemeans no warming at all, andcacheLimitMBstill caps the result, so warming a world larger than the cap just evicts its own earlier work (decide whether to warm at all in that case, or warm nearest-to-spawn first)Sequence this after #160 — warming on the main thread would be the freeze this is meant to avoid, at a larger scale.