Skip to content
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

Size of app (windows) optimization #1255

Open
garygreen opened this issue Apr 12, 2023 · 2 comments
Open

Size of app (windows) optimization #1255

garygreen opened this issue Apr 12, 2023 · 2 comments

Comments

@garygreen
Copy link

The original v2 of smtp4dev use to be a super lightweight simple 500KB exe. The new v3 version is awesome and has a lot of new features, but it has reached a huge 170MB, which seems a lot for a relatively simple SMTP web server.

I wonder if there is a way to optimize the production build of the app to use less space? For example, maybe the language files aren't necessary for all users, or certain .NET dll libraries, reduction in JS size? That would have improvements in speed of the UI.

As a side note, as a first time user, when you extract the files it's quite unwieldy and hard to know what the entry point is to start the application.

v2, super simple small exe - 540KB

image

v3, large, many files - 127MB

image

Take note of some Javascript that is 7MB on it's own, and seems to be related to sourcemaps (is this needed for a production build?). And vendor js taking up almost 3MB, that's a sizeable amount of Javascript.

Majority of the app seems to relate to use of .NET dll files (all in blue):

image

@garygreen
Copy link
Author

@rnwood
Copy link
Owner

rnwood commented Mar 10, 2024

Good feedback about the entry point. A change was recently made for the platform specific builds to pack into only a few files

Also good feedback about the JS symbols. These should now be excluded from release builds.

The rest is mostly because for the platform that this is now built on, you have to bundle all the dependencies with the app. You've also downloaded one of the platform specific builds that includes the runtime. Whereas for the original smtp4dev, the runtime and framework libraries were shipped with Windows.

Unfortunately, the linking and tree shaking is not yet available for the type of web app that we are using, but if that comes in future, we will enable it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants