8000 Multi-Threading and Asynchronous Execution Micro-Optimization · Issue #1786 · kickstarter/android-oss · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Multi-Threading and Asynchronous Execution Micro-Optimization #1786
Open
@CamiloFallaM

Description

@CamiloFallaM

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0