perf(app): fix composer lag via buffered blob draft storage (#40207)
This commit is contained in:
parent
3307f99f1f
commit
6ff0adef22
32 changed files with 503 additions and 82 deletions
|
|
@ -9,6 +9,7 @@ import {
|
|||
type Locale,
|
||||
type Platform,
|
||||
PlatformProvider,
|
||||
createDraftStore,
|
||||
ServerConnection,
|
||||
useCommand,
|
||||
useWslServers,
|
||||
|
|
@ -226,6 +227,13 @@ const createPlatform = (windowState: DesktopWindowState): Platform => {
|
|||
},
|
||||
|
||||
storage,
|
||||
draftStore: createDraftStore({
|
||||
get: window.api.draftGet,
|
||||
set: window.api.draftSet,
|
||||
remove: window.api.draftDelete,
|
||||
putBlob: (blob) => blob.arrayBuffer().then(window.api.draftBlobPut),
|
||||
getBlob: (id) => window.api.draftBlobGet(id).then((data) => data && new Blob([data])),
|
||||
}),
|
||||
|
||||
updater: {
|
||||
state: updaterState,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue