fix: drawer performance issue

This commit is contained in:
Felix Roos 2023-12-28 17:54:51 +01:00
parent 624affe092
commit a9dc0912d0
3 changed files with 12 additions and 4 deletions

View file

@ -57,10 +57,7 @@ export function Repl2({ embedded = false }) {
const shouldDraw = true;
const init = useCallback(({ shouldDraw }) => {
// TODO: find way to make spiral & punchcard work (if there's any)
// upping the 2nd value leads to slow eval times
// because Drawer.invalidate might query alot at one time
const drawTime = [0, 0];
const drawTime = [-2, 2];
const drawContext = shouldDraw ? getDrawContext() : null;
let onDraw;
if (shouldDraw) {