[GH-ISSUE #1279] [Bug]: huge app size due to duplicate (non-symlinked) framework files #500

Closed
opened 2026-03-23 20:37:13 +00:00 by mirror · 5 comments
Owner

Originally created by @eugenesvk on GitHub (Oct 14, 2022).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/1279

Originally assigned to: @LucasXu0 on GitHub.

Bug Description

The macOS app is ~180Mb, which is surprising for a non-Electron app.
I've noticed that there are multiple duplicate identical files in a structure that is usually one regular file with multiple symlinks, e.g.

./AppFlowy.app/Contents/Frameworks/App.framework/Versions
./AppFlowy.app/Contents/Frameworks/App.framework/Versions/A
./AppFlowy.app/Contents/Frameworks/App.framework/Versions/A/App      	← 25Mb file
./AppFlowy.app/Contents/Frameworks/App.framework/Versions/Current    	.two of these should be links
./AppFlowy.app/Contents/Frameworks/App.framework/Versions/Current/App	← 25Mb file
./AppFlowy.app/Contents/Frameworks/App.framework/App                 	← 25Mb file

Same thing with the FlutterMacOS.framework

How to Reproduce

Download the zip release file from this repo
Unzip it
View the content of the AppFlowy.app app (see the paths above)

Expected Behavior

Only a single version fo the framework should be present, everything else should be a symlink

Operating System

macOS 10.15

AppFlowy Version(s)

0.0.5.3 (1)

Screenshots

No response

Additional Context

Might this be due to some wrong zip/unzip options that don't preserve symlinks? Or was this issue part of some build process error?
(manually replacing 2×3 files with 2 files and 2×2 symlinks had no effect on the app, except for reducing its size to <80m)

Originally created by @eugenesvk on GitHub (Oct 14, 2022). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/1279 Originally assigned to: @LucasXu0 on GitHub. ### Bug Description The macOS app is ~180Mb, which is surprising for a non-Electron app. I've noticed that there are multiple duplicate identical files in a structure that is usually one regular file with multiple symlinks, e.g. ``` ./AppFlowy.app/Contents/Frameworks/App.framework/Versions ./AppFlowy.app/Contents/Frameworks/App.framework/Versions/A ./AppFlowy.app/Contents/Frameworks/App.framework/Versions/A/App ← 25Mb file ./AppFlowy.app/Contents/Frameworks/App.framework/Versions/Current .two of these should be links ./AppFlowy.app/Contents/Frameworks/App.framework/Versions/Current/App ← 25Mb file ./AppFlowy.app/Contents/Frameworks/App.framework/App ← 25Mb file ``` Same thing with the `FlutterMacOS.framework` ### How to Reproduce Download the zip release file from this repo Unzip it View the content of the `AppFlowy.app` app (see the paths above) ### Expected Behavior Only a single version fo the framework should be present, everything else should be a symlink ### Operating System macOS 10.15 ### AppFlowy Version(s) 0.0.5.3 (1) ### Screenshots _No response_ ### Additional Context Might this be due to some wrong zip/unzip options that don't preserve symlinks? Or was this issue part of some build process error? (manually replacing 2×3 files with 2 files and 2×2 symlinks had no effect on the app, except for reducing its size to <80m)
mirror 2026-03-23 20:37:13 +00:00
Author
Owner

@LucasXu0 commented on GitHub (Oct 14, 2022):

It's odd. The size of the macOS app is about 140MB when I execute the flutter build macos --release on my local desktop. But the size of the macOS app is about 180+MB when it is built from CI.

I will try to fix it before releasing the next version.

<!-- gh-comment-id:1278971438 --> @LucasXu0 commented on GitHub (Oct 14, 2022): It's odd. The size of the macOS app is about 140MB when I execute the `flutter build macos --release` on my local desktop. But the size of the macOS app is about 180+MB when it is built from CI. I will try to fix it before releasing the next version.
Author
Owner

@LucasXu0 commented on GitHub (Oct 15, 2022):

Hi, @eugenesvk. The symlink parameter is not passed when compressing. I updated the build script and verified it on my personal repo. Thank you so much for the suggestion.

https://github.com/LucasXu0/AppFlowy/releases/tag/1000.0.0

<!-- gh-comment-id:1279697329 --> @LucasXu0 commented on GitHub (Oct 15, 2022): Hi, @eugenesvk. The `symlink` parameter is not passed when compressing. I updated the build script and verified it on my personal repo. Thank you so much for the suggestion. https://github.com/LucasXu0/AppFlowy/releases/tag/1000.0.0
Author
Owner

@LucasXu0 commented on GitHub (Oct 15, 2022):

The size of the macOS package has dropped by about 40MB.

Before
before

After
after

<!-- gh-comment-id:1279697865 --> @LucasXu0 commented on GitHub (Oct 15, 2022): The size of the macOS package has dropped by about 40MB. **Before** <img width="1367" alt="before" src="https://user-images.githubusercontent.com/11863087/195977849-95b60880-ce51-4797-af37-52ad759f7611.png"> **After** <img width="1410" alt="after" src="https://user-images.githubusercontent.com/11863087/195977858-f3b5bfb1-5ddd-4479-85b8-a2d80ceadb07.png">
Author
Owner

@eugenesvk commented on GitHub (Oct 15, 2022):

Can confirm that your fork has symlinks and those two huge app/fluttermacos framework files aren't duplicate any more, thanks!
Still looks a bit large for a native note app (100m=50m two frameworks + 50m the app binary itself), but that's a separate issue

<!-- gh-comment-id:1279706661 --> @eugenesvk commented on GitHub (Oct 15, 2022): Can confirm that your fork has symlinks and those two huge app/fluttermacos framework files aren't duplicate any more, thanks! Still looks a bit large for a native note app (100m=50m two frameworks + 50m the app binary itself), but that's a separate issue
Author
Owner

@LucasXu0 commented on GitHub (Oct 17, 2022):

The size of a new-created flutter app without any features is about 46M. So I think it is acceptable for the 100M now.

<!-- gh-comment-id:1280177911 --> @LucasXu0 commented on GitHub (Oct 17, 2022): The size of a new-created flutter app without any features is about 46M. So I think it is acceptable for the 100M now.
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#500
No description provided.