chore(perf): initialisation and rendering performance optimisations #2430
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Performance optimizations: initialization speed increased,
blocks.render()
API method optimized. Big documents will be displayed faster.DocumentFragment
instead of a separate insertion.requestIdleCallback
to bind them after rendering.await
fromcore.ts
module validation and initialization since they are not async.requestIdleCallback
Initialization time with 2700 Blocks:
Before: 2000—3000ms
After: 250—350ms
Initialization Loader has been removed.
It led unnecessary layout, and also people asked about disabling it. It could be easily implemented outside the Editor.
Resolves #2340
Resolves #1305
The
blocks.insertMany()
API method was added. It allows inserting several Blocks into the specified index.Just because we now have the
BlockManager.insertMany()
method. Also, someone asked about it in a Telegram channel.I'll add tests for it to this PR soon.
Selection style won't override your custom style for
::selection
outside the editor.::selection
selector moved to the.codex-editor
scopeResolves #1931
"Editor saving" and "I'm ready" logs removed
Annoying and unuseful.
Plugin
cypress-terminal-report
For more detailed reports in cypres terminal output:
If tool throws error during render, we will use Stub tool instead of skipping
To save tool's data and let user know that he has that block in a document
BlockManager clear() method improved
Previously, it just removes blocks from
.blocks
Proxy. Now it destroys blocks instances and emits "block-removed" events.