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

Plugin speedup! 🚅 #558

Merged
merged 7 commits into from
Jun 4, 2023
Merged

Plugin speedup! 🚅 #558

merged 7 commits into from
Jun 4, 2023

Conversation

vlazdra
Copy link
Contributor

@vlazdra vlazdra commented May 23, 2023

Hi @jonbhanson!
I recently started with a white-label project, and integrated your plugin in a CI/CD pipeline.

The thing that caught my eye is the time that is needed to generate all the assets when running the command
in a white-label project. So wanted to contribute again like with the flavors integration! 🙌

There are 2 things in this PR, both mentioned in the README.md and the CHANGELOG.md
Let's go backwards, the plural of the flavor command --flavors -- a comma separated list of all the flavors that the developer has setup in the project (just for ease of use). So instead of running the command 3 times, you just specify all the flavors and the plugin takes care of the rest.

The second change is the most fun one, the speed up of the execution time of the generating process. 🙌
Please note that I tested this inside my project with 3 flavors set up only for Android and iOS (mobile is only supported either way).

Here are my execution times

Execution tim Second Header
Original 28922 milliseconds
With new changes 7086 milliseconds

That's approximately a 4x speed increase! 🚄 🚄 🚄
Just by leveraging Dart Isolates and generated every image in it's own thread, the speed improvement is awesome!

Looking forward for your feedback!

pubspec.yaml Show resolved Hide resolved
@vlazdra vlazdra changed the title Plugin speed! Plugin speedup! 🚅 May 23, 2023
Copy link
Owner

@jonbhanson jonbhanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vlazdra great work on this PR! This is an excellent improvement to the package. I have a few comments before merging.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
lib/android.dart Show resolved Hide resolved
lib/ios.dart Outdated Show resolved Hide resolved
lib/ios.dart Outdated Show resolved Hide resolved
@vlazdra vlazdra requested a review from jonbhanson May 29, 2023 07:17
@jonbhanson jonbhanson merged commit dd7a57c into jonbhanson:master Jun 4, 2023
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

Successfully merging this pull request may close these issues.

2 participants