Move all live stores into a fresh WASM instance. Call explicitly while idle;
the main-thread pause scales with resident data and compact undo history.
Preparation failures leave every live store and the selected instance unchanged.
A larger replacement is discarded; the report then has zero migrated stores.
function initSheetwrite(source?: BufferSource | URL | string | Request | WebAssembly.Module, engine?: SheetwriteEngine): Promise<void>functioninitSheetwrite(source?:BufferSource|URL|string|Request|WebAssembly.Module,engine?:SheetwriteEngine,):Promise<void>functioninitSheetwrite(source?:|BufferSource|URL|string|Request|WebAssembly.Module,engine?:SheetwriteEngine,):Promise<void>Load one WASM engine before createGrid. The default is @sheetwrite/wasm. Pass the @sheetwrite/formulas module as the second argument to select the full engine.Exampleimport { initSheetwrite } from"@sheetwrite/core";import*as formulas from"@sheetwrite/formulas";awaitinitSheetwrite(undefined, formulas);See also/docs/guides/formulas/See alsocreateGridAPI reference →function releaseEngineMemory(): Promise<EngineMemoryReleaseReport>functionreleaseEngineMemory():Promise<EngineMemoryReleaseReport>functionreleaseEngineMemory():Promise<EngineMemoryReleaseReport>Move all live stores into a fresh WASM instance. Call explicitly while idle; the main-thread pause scales with resident data and compact undo history. Preparation failures leave every live store and the selected instance unchanged. A larger replacement is discarded; the report then has zero migrated stores.Exampleimport { initSheetwrite, releaseEngineMemory } from"@sheetwrite/core";awaitinitSheetwrite();// Run between user actions, not in an input or render callback.constreport=awaitreleaseEngineMemory();document.body.dataset.engineBytes =String(report.wasmBytesAfter);See alsoEngineMemoryReleaseReportAPI reference →const report: EngineMemoryReleaseReportconstreport:EngineMemoryReleaseReportconstreport:EngineMemoryReleaseReportAPI reference →var document: Documentvar document:Documentvar document:Documentwindow.document returns a reference to the document contained in the window. MDN ReferenceDocument.body: HTMLElementinterfaceDocument {body:HTMLElement;}interfaceDocument {body:HTMLElement;}The Document.body property represents the null if no such element exists. MDN ReferenceHTMLOrSVGElement.dataset: DOMStringMapinterfaceHTMLOrSVGElement {dataset:DOMStringMap;}interfaceHTMLOrSVGElement {dataset:DOMStringMap;}MDN ReferenceDOMStringMap[string]: string | undefinedDOMStringMap[string]: string |undefinedDOMStringMap[string]: string |undefinedvar String: StringConstructor
(value?: any) => stringvar String:StringConstructor;(value?:any) => stringvar String:StringConstructor;(value?:any) => stringAllows manipulation and formatting of text strings and determination and location of substrings within strings.EngineMemoryReleaseReport.wasmBytesAfter: numberinterfaceEngineMemoryReleaseReport {wasmBytesAfter:number;}interfaceEngineMemoryReleaseReport {wasmBytesAfter:number;}Committed linear memory of its replacement, including migration scratch.API reference →interface EngineMemoryReleaseReport {
readonly stores: number;
readonly wasmBytesBefore: number;
readonly wasmBytesAfter: number;
readonly pauseMs: number;
}interfaceEngineMemoryReleaseReport {readonlystores:number;readonlywasmBytesBefore:number;readonlywasmBytesAfter:number;readonlypauseMs:number;}interfaceEngineMemoryReleaseReport {readonlystores:number;readonlywasmBytesBefore:number;readonlywasmBytesAfter:number;readonlypauseMs:number;}Result of an explicit, all-store engine memory release.API reference →