(core) open documents without blocking on data engine

Summary:
With this diff, when a user opens a Grist document in a browser, they will be able to view its contents without waiting for the data engine to start up. Once the data engine starts, it will run a calculation and send any updates made. Changes to the document will be blocked until the engine is started and the initial calculation is complete.

The increase in responsiveness is useful in its own right, and also reduces the impact of an extra startup time in a candidate next-generation sandbox.

A small unrelated fix is included for `core/package.json`, to catch up with a recent change to `package.json`.

A small `./build schema` convenience is added to just rebuild the typescript schema file.

Test Plan: added test; existing tests pass - small fixes needed in some cases because of new timing

Reviewers: dsagal

Reviewed By: dsagal

Differential Revision: https://phab.getgrist.com/D3036
This commit is contained in:
Paul Fitzpatrick
2021-10-01 09:45:27 -04:00
parent 42910cb8f7
commit b3b7410ede
15 changed files with 555 additions and 86 deletions

View File

@@ -267,4 +267,9 @@ export interface ActiveDocAPI {
* regardless of rules that may block access to them.
*/
getAclResources(): Promise<{[tableId: string]: string[]}>;
/**
* Wait for document to finish initializing.
*/
waitForInitialization(): Promise<void>;
}

View File

@@ -1,6 +1,8 @@
/*** THIS FILE IS AUTO-GENERATED BY core/sandbox/gen_js_schema.py ***/
// tslint:disable:object-literal-key-quotes
export const SCHEMA_VERSION = 24;
export const schema = {
"_grist_DocInfo": {