Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Question: background may be slower #6

Open
BufferUnderflower opened this issue Jul 24, 2020 · 3 comments
Open

Question: background may be slower #6

BufferUnderflower opened this issue Jul 24, 2020 · 3 comments

Comments

@BufferUnderflower
Copy link

Hello, thanks for this handy package! In Readme you're saying that using background compute can be slower. Could you please share sample data / describe in brief your findings?
I assume results heavily depend on particular device and parallelism implementation by different vendors.
But may be you can share some rough data just to know what to expect, like worse case scenarios, severity and share of problem cases you observed.
Thank you!

@mars3142
Copy link

I did use this implementation (got the project from someone else) and we do at startup 9 rest calls and every of them created an isolate with compute. I measured the app start (with a simple timer) and without this package, the app started 2sec faster, because we don't create any threads.

After that, I switched to Work Manager and spawn at startup an isolate pool and reuse the isolates for every rest call. This approach is way better, than every time to spawn a new isolate.

I wouldn't recommend this package.

@espadon8004
Copy link

@mars3142 so if I understand correctly, you reuse the same isolate only to process the "jsonDecode" ?

@mars3142
Copy link

mars3142 commented Nov 5, 2020

@espadon8004 Correct. This will do the trick. Use of an isolate pool and reuse them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants