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

Multi-Threading and Asynchronous Execution Micro-Optimization #1786

Open
CamiloFallaM opened this issue May 27, 2023 · 0 comments
Open

Multi-Threading and Asynchronous Execution Micro-Optimization #1786

CamiloFallaM opened this issue May 27, 2023 · 0 comments

Comments

@CamiloFallaM
Copy link

Hi Kickstarter Team!

My name is Camilo Falla and I´m a student at Universidad de Los Andes in Bogotá, Colombia studying Computer Science. I had the opportunity to take a look into the Kotlin repository in GitHub and found some micro-optimization ideas I would like to share with you. The ideas have to do with the use of Multi-Threading and Asynchronous Execution. In the file BooleanDataStore.kt we found the use of runBlocking which blocks the main Thread to continue with imperative tasks. That´s why, we think you should use a Couroutine that can add data to the DataStore in an asynchronous way without blocking the main thread. We think this will have a positive impact on the general performance of the app.

This would be the changes we would make on the file:

image

image

I think this micro-optimization would have a positive impact on the general application´s performance and efficiency. We hope you can take it into account in the future!

Best regards,
Camilo Falla, Carlos Silva, Juan José Beltrán

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

1 participant