[PR #3357] [MERGED] feat: improve performance of document page #5690

Closed
opened 2026-03-23 22:19:52 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/3357
Author: @LucasXu0
Created: 9/7/2023
Status: Merged
Merged: 9/12/2023
Merged by: @LucasXu0

Base: mainHead: editor_optimization


📝 Commits (3)

  • a03701c feat: improve performance of document page
  • f9d556b chore: upgrade editor version
  • ed6af02 Merge branch 'main' into editor_optimization

📊 Changes

10 files changed (+68 additions, -26 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/checklist_cell/checklist_cell_editor_bloc.dart (+1 -1)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart (+13 -14)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/actions/block_action_option_button.dart (+7 -5)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/callout/callout_block_component.dart (+14 -0)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/code_block/code_block_component.dart (+14 -0)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/custom_copy_command.dart (+1 -1)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/document_header_node_widget.dart (+1 -2)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toggle/toggle_block_component.dart (+14 -0)
📝 frontend/appflowy_flutter/pubspec.lock (+2 -2)
📝 frontend/appflowy_flutter/pubspec.yaml (+1 -1)

📄 Description

Feature Preview

  • Support both Column layout and ScrollableList layout.
  • Optimize the calculation of the cursor/selection.

Simple benchmark

  1. Paste 10000+ lines on the document page
  2. Test the performance of scrolling, selecting, and scrolling

Result
UI: from 60-200ms/frame to 1-2ms/frame
Memory: TBD
CPU: TBD

Before

https://github.com/AppFlowy-IO/AppFlowy/assets/11863087/b1bafded-5882-438b-8852-90a3b694dfcb

After

https://github.com/AppFlowy-IO/AppFlowy/assets/11863087/5f9a1ba1-1b38-4c0c-93ce-383f660d394d


PR Checklist

  • My code adheres to the AppFlowy Style Guide
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/3357 **Author:** [@LucasXu0](https://github.com/LucasXu0) **Created:** 9/7/2023 **Status:** ✅ Merged **Merged:** 9/12/2023 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `editor_optimization` --- ### 📝 Commits (3) - [`a03701c`](https://github.com/AppFlowy-IO/AppFlowy/commit/a03701c751e0f00cfb6b8949f1059720d5b3461c) feat: improve performance of document page - [`f9d556b`](https://github.com/AppFlowy-IO/AppFlowy/commit/f9d556b252828f2f5ef3bcf23103317f99419f4f) chore: upgrade editor version - [`ed6af02`](https://github.com/AppFlowy-IO/AppFlowy/commit/ed6af0205b823812efdc2f1e9110e54171a71932) Merge branch 'main' into editor_optimization ### 📊 Changes **10 files changed** (+68 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/checklist_cell/checklist_cell_editor_bloc.dart` (+1 -1) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart` (+13 -14) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/actions/block_action_option_button.dart` (+7 -5) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/callout/callout_block_component.dart` (+14 -0) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/code_block/code_block_component.dart` (+14 -0) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/custom_copy_command.dart` (+1 -1) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/document_header_node_widget.dart` (+1 -2) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toggle/toggle_block_component.dart` (+14 -0) 📝 `frontend/appflowy_flutter/pubspec.lock` (+2 -2) 📝 `frontend/appflowy_flutter/pubspec.yaml` (+1 -1) </details> ### 📄 Description <!--- Thank you for submitting a pull request to AppFlowy. The team will dedicate their best efforts to reviewing and approving your pull request. If you have any questions about the project or feedback for us, please join our [Discord](https://discord.gg/wdjWUXXhtw). --> <!--- If your pull request adds a new feature, please drag and drop a video into this section to showcase what you've done! If not, you may delete this section. --> ### Feature Preview - Support both **Column** layout and **ScrollableList** layout. - Optimize the calculation of the cursor/selection. #### Simple benchmark 1. Paste 10000+ lines on the document page 2. Test the performance of scrolling, selecting, and scrolling **Result** UI: from **60-200ms/frame** to **1-2ms/frame** Memory: TBD CPU: TBD **Before** https://github.com/AppFlowy-IO/AppFlowy/assets/11863087/b1bafded-5882-438b-8852-90a3b694dfcb **After** https://github.com/AppFlowy-IO/AppFlowy/assets/11863087/5f9a1ba1-1b38-4c0c-93ce-383f660d394d <!--- List at least one issue here that this PR addresses. If it fixes the issue, please use the [fixes](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) keyword to close the issue. For example: fixes https://github.com/AppFlowy-IO/AppFlowy/pull/2106 --> --- <!--- Before you mark this PR ready for review, run through this checklist! --> #### PR Checklist - [x] My code adheres to the [AppFlowy Style Guide](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/style-guides) - [x] I've listed at least one issue that this PR fixes in the description above. - [ ] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [ ] All existing tests are passing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 22:19:52 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#5690
No description provided.