Skip to content

Make the file-system module run in a background thread [$300] #2239

@sebawita

Description

@sebawita

Calling file-sytem -> writeText is freezing the UI of my apps until the write process is complete. Even the ActivityIndicator freezes during that time.
This is a big issue when saving big chunks of data which can take between 10 to 60 seconds to write.

I have tested it on Android with NativeScript 2.0.1

To solve that it would be great if the write functionality could run in a background thread, just like it is done for the http module.

Here is the scenario where I need to save big chunks of data.
The app I am building uses Lokijs for Offline Storage mechanism, where I store 50k records from different tables. When I call save database, the LokiNativeScriptAdapter uses file-system module to save the data to a file, which takes up to 60 seconds.


There is a $300 open bounty on this issue. Add to the bounty at Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions