debug total render size

This commit is contained in:
zsviczian 2023-04-04 18:42:34 +02:00
parent a26e8bade8
commit 808e4711f9
4 changed files with 47 additions and 34 deletions

View file

@ -1362,7 +1362,9 @@ class App extends React.Component<AppProps, AppState> {
).getPropertyValue("--color-selection");
const now = Date.now();
if(!this.state.shouldCacheIgnoreZoom) console.log(`renderScene`,now);
if (!this.state.shouldCacheIgnoreZoom) {
console.log(`renderScene`, now);
}
renderScene(
{
elements: renderingElements,
@ -1400,10 +1402,13 @@ class App extends React.Component<AppProps, AppState> {
this.setState({ scrolledOutside });
}
this.scheduleImageRefresh();
if(!this.state.shouldCacheIgnoreZoom) setTimeout(()=>console.log(`after renderScene`,now));
if (!this.state.shouldCacheIgnoreZoom) {
setTimeout(() => console.log(`after renderScene`, now));
}
},
},
true || THROTTLE_NEXT_RENDER && window.EXCALIDRAW_THROTTLE_RENDER === true,
true ||
(THROTTLE_NEXT_RENDER && window.EXCALIDRAW_THROTTLE_RENDER === true),
);
if (!THROTTLE_NEXT_RENDER) {