[PR #5930] [MERGED] chore: optimize generation speed #7094

Closed
opened 2026-03-23 23:18:04 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/5930
Author: @LucasXu0
Created: 8/11/2024
Status: Merged
Merged: 8/13/2024
Merged by: @LucasXu0

Base: mainHead: optimize_generation


📝 Commits (10+)

  • 01fbadb chore: optimize language generation speed
  • 8fa85f7 chore: optimize code generation speed
  • 0d6a0ff chore: optimize freezed generation speed
  • 28f5ddb chore: optimzie appflowy_backend generation speed
  • 5d3cb3c chore: optimize appflowy_result
  • 7261b65 chore: optimzie flowy_infra generation speed
  • 78ddd7e chore: optimzie flowy_infra_ui generation speed
  • c4b0c9e chore: optimzie appflowy_flutter generation speed
  • 499c0ea chore: optimize generate.sh
  • dd93fd1 chore: optimize the execution order

📊 Changes

13 files changed (+271 additions, -135 deletions)

View changed files

frontend/appflowy_flutter/build.yaml (+0 -0)
📝 frontend/appflowy_flutter/packages/appflowy_backend/pubspec.yaml (+2 -6)
📝 frontend/appflowy_flutter/packages/appflowy_result/pubspec.yaml (+1 -7)
📝 frontend/appflowy_flutter/packages/flowy_infra/pubspec.yaml (+0 -4)
📝 frontend/appflowy_flutter/packages/flowy_infra_ui/pubspec.yaml (+2 -4)
📝 frontend/appflowy_flutter/packages/flowy_svg/analysis_options.yaml (+0 -2)
📝 frontend/appflowy_flutter/pubspec.lock (+6 -53)
📝 frontend/appflowy_flutter/pubspec.yaml (+3 -11)
📝 frontend/scripts/code_generation/flowy_icons/generate_flowy_icons.sh (+61 -6)
📝 frontend/scripts/code_generation/freezed/generate_freezed.sh (+82 -21)
📝 frontend/scripts/code_generation/generate.sh (+50 -11)
📝 frontend/scripts/code_generation/language_files/generate_language_files.sh (+63 -9)
📝 frontend/scripts/makefile/flutter.toml (+1 -1)

📄 Description

Feature Preview

The cost time for clean build reduced from 160s to 110s.

Before

Screenshot 2024-08-12 at 09 16 21

After

Screenshot 2024-08-12 at 09 16 26

The cost time for incremental build reduced from 130s to 43s. (change one freezed file, one svg and one translation)

Before

Screenshot 2024-08-12 at 09 22 43

After

Screenshot 2024-08-12 at 09 30 26

PR Checklist

  • My code adheres to AppFlowy's Conventions
  • 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/5930 **Author:** [@LucasXu0](https://github.com/LucasXu0) **Created:** 8/11/2024 **Status:** ✅ Merged **Merged:** 8/13/2024 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `optimize_generation` --- ### 📝 Commits (10+) - [`01fbadb`](https://github.com/AppFlowy-IO/AppFlowy/commit/01fbadb1a3e1ce5b81f7e8e20b9ef642224cd406) chore: optimize language generation speed - [`8fa85f7`](https://github.com/AppFlowy-IO/AppFlowy/commit/8fa85f742d59a3d12f0fc860f01b9c1c49f4ec8b) chore: optimize code generation speed - [`0d6a0ff`](https://github.com/AppFlowy-IO/AppFlowy/commit/0d6a0ff2d4def267ae9d9094d6fa0d32a89d7701) chore: optimize freezed generation speed - [`28f5ddb`](https://github.com/AppFlowy-IO/AppFlowy/commit/28f5ddbfe844b779c5c1a61211a1eadb0aa8e8b4) chore: optimzie appflowy_backend generation speed - [`5d3cb3c`](https://github.com/AppFlowy-IO/AppFlowy/commit/5d3cb3c04222b9ac7cf90d055b5228e5bbe9cf16) chore: optimize appflowy_result - [`7261b65`](https://github.com/AppFlowy-IO/AppFlowy/commit/7261b65bae7b2e487eaf29148494af19ddf316b8) chore: optimzie flowy_infra generation speed - [`78ddd7e`](https://github.com/AppFlowy-IO/AppFlowy/commit/78ddd7e4d38c1aee3bbfae86338fab6aa59916dc) chore: optimzie flowy_infra_ui generation speed - [`c4b0c9e`](https://github.com/AppFlowy-IO/AppFlowy/commit/c4b0c9eff12071e9ef85d9ff9beebf49ceb256fb) chore: optimzie appflowy_flutter generation speed - [`499c0ea`](https://github.com/AppFlowy-IO/AppFlowy/commit/499c0eafb5e689e3cd6e4a605ec60cfc3b4f088e) chore: optimize generate.sh - [`dd93fd1`](https://github.com/AppFlowy-IO/AppFlowy/commit/dd93fd1e51ce0794791e5e0b338cb40a6d64bb8e) chore: optimize the execution order ### 📊 Changes **13 files changed** (+271 additions, -135 deletions) <details> <summary>View changed files</summary> ➕ `frontend/appflowy_flutter/build.yaml` (+0 -0) 📝 `frontend/appflowy_flutter/packages/appflowy_backend/pubspec.yaml` (+2 -6) 📝 `frontend/appflowy_flutter/packages/appflowy_result/pubspec.yaml` (+1 -7) 📝 `frontend/appflowy_flutter/packages/flowy_infra/pubspec.yaml` (+0 -4) 📝 `frontend/appflowy_flutter/packages/flowy_infra_ui/pubspec.yaml` (+2 -4) 📝 `frontend/appflowy_flutter/packages/flowy_svg/analysis_options.yaml` (+0 -2) 📝 `frontend/appflowy_flutter/pubspec.lock` (+6 -53) 📝 `frontend/appflowy_flutter/pubspec.yaml` (+3 -11) 📝 `frontend/scripts/code_generation/flowy_icons/generate_flowy_icons.sh` (+61 -6) 📝 `frontend/scripts/code_generation/freezed/generate_freezed.sh` (+82 -21) 📝 `frontend/scripts/code_generation/generate.sh` (+50 -11) 📝 `frontend/scripts/code_generation/language_files/generate_language_files.sh` (+63 -9) 📝 `frontend/scripts/makefile/flutter.toml` (+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 The cost time for clean build reduced from 160s to 110s. #### Before <img width="876" alt="Screenshot 2024-08-12 at 09 16 21" src="https://github.com/user-attachments/assets/0960f308-7166-492a-98de-98b010031075"> #### After <img width="618" alt="Screenshot 2024-08-12 at 09 16 26" src="https://github.com/user-attachments/assets/3557e13f-a0d3-40d8-a040-5edc51e426af"> The cost time for incremental build reduced from 130s to 43s. (change one freezed file, one svg and one translation) #### Before <img width="486" alt="Screenshot 2024-08-12 at 09 22 43" src="https://github.com/user-attachments/assets/cae8d3cd-10d1-4495-94c6-ba7411c3e0bd"> #### After <img width="785" alt="Screenshot 2024-08-12 at 09 30 26" src="https://github.com/user-attachments/assets/9d48097a-5159-4269-a8e7-9a334fa0a4e7"> <!--- 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 [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [ ] 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 23:18:04 +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#7094
No description provided.