mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-26 06:02:41 +00:00
perf(frontend): coalesce streaming markdown parses
Restore animation-frame scheduling when text fade is disabled.\n\nRefs #20878\nRestores #23868
This commit is contained in:
parent
b854389951
commit
9f8960f222
1 changed files with 3 additions and 9 deletions
|
|
@ -75,17 +75,11 @@
|
|||
};
|
||||
|
||||
const updateHandler = (content) => {
|
||||
if (content) {
|
||||
if (done) {
|
||||
cancelAnimationFrame(pendingUpdate);
|
||||
if (content && !pendingUpdate) {
|
||||
pendingUpdate = requestAnimationFrame(() => {
|
||||
pendingUpdate = null;
|
||||
parseTokens();
|
||||
} else if (!pendingUpdate) {
|
||||
pendingUpdate = requestAnimationFrame(() => {
|
||||
pendingUpdate = null;
|
||||
parseTokens();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue