fix(perf): prevent Canvas double-mount on /site redirect
HomePage used to mount the Canvas before its effect fired the redirect to /site, then unmount it as soon as the route changed. That left the WebGL context torn down mid-load with GLTF requests still in flight, which on slow GPUs ended in a 'Context Lost' and a stuck 1 FPS render once the user came back from /site. The fix is a synchronous cookie check after all hooks: if the user has not visited /site today we return null and let the redirect happen without ever creating a GL context. Also drops the GameMap 'lite map skipped' log from warn to info: it is an expected lite-loading path, not a problem worth a yellow warning.
This commit is contained in:
@@ -175,7 +175,7 @@ export function GameMap({
|
||||
sceneData.mapNodes.length - visibleMapNodes.length;
|
||||
|
||||
if (skippedMapNodeCount > 0) {
|
||||
logger.warn("GameMap", "Lite map skipped heavy map nodes", {
|
||||
logger.info("GameMap", "Lite map skipped heavy map nodes", {
|
||||
skippedMapNodeCount,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user