mst-gql
mst-gql copied to clipboard
query using web worker?
My app works offline (more info here). To prevent the user from having to remember to sync data before going offline it queries all data at startup. This tends to degrade the user's experience during the first few seconds after starting up. There is a definite spike in cpu usage at startup.
A possible solution would be to query inside a web worker.
Has any one done this using mst-gql? Any hints as to how to tackle this? I have no idea how mst-gql works internally.
Uups: https://stackoverflow.com/a/52373099/712005. Maybe the querying is not be the (biggest) problem. Rather what happens with the data afterwards.
Hi @barbalex Im trying to help get all the issues organized. I see this has been sitting on the shelf for awhile... anything I can assist with?
@Benz19 Thanks a lot for your effort. I have moved that project off of mst-gql since so this is not bottering me. Feel free to close the isssue.
I have moved that project off of mst-gql (...)
Sorry to hijack this thread, but I'm curious about why you moved off of mst-gql. Would you mind sharing why you did that? Thanks :)
@fullofcaffeine Hi, curious hijacker ;-)
Offline-capable apps need to keep the data locally. When using this together with a method to keep the data live (some form of live queries), it can be easier to ditch state management libraries and use the data tools also for state.
In the mentioned app that was: WatermelonDB combined with RxJS. In my newer app (in development) it is SQLite with electric-sql.
Needing less concepts and tools reduces complexity.
Nice, thanks for elaborating!