mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-14 03:33:52 +01:00
Merge pull request #1377 from danielyxie/dev
imrpove terminal performance
This commit is contained in:
commit
19970f25df
46
dist/vendor.bundle.js
vendored
46
dist/vendor.bundle.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -61,8 +61,8 @@ export function TerminalRoot({ terminal, router, player }: IProps): React.ReactE
|
|||||||
setKey((key) => key + 1);
|
setKey((key) => key + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => TerminalEvents.subscribe(rerender), []);
|
useEffect(() => TerminalEvents.subscribe(_.debounce(async () => rerender(), 25, { maxWait: 50 })), []);
|
||||||
useEffect(() => TerminalClearEvents.subscribe(clear), []);
|
useEffect(() => TerminalClearEvents.subscribe(_.debounce(async () => clear(), 25, { maxWait: 50 })), []);
|
||||||
|
|
||||||
function doScroll(): void {
|
function doScroll(): void {
|
||||||
const hook = scrollHook.current;
|
const hook = scrollHook.current;
|
||||||
|
Loading…
Reference in New Issue
Block a user