-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(perf): initialisation and rendering performance optimisations #2430
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
neSpecc
requested review from
gohabereg,
TatianaFomina and
ilyamore88
as code owners
July 31, 2023 23:14
ilyamore88
approved these changes
Aug 7, 2023
gohabereg
approved these changes
Aug 7, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.