Skip to content

Advice for the use of isolates #2957

Answered by simolus3
frankvollebregt asked this question in Q&A
Discussion options

You must be logged in to vote

When using drift isolates, there is a slowdown due to the asynchronous communication channels used to issue database requests. So operations take longer in total, but the actual time spent synchronously processing them on the isolate accessing the database is lower. That makes them a good choice for UIs which are typically asynchronous to begin with, and also more susceptible to lag caused by blocking IO.

As you've seen, this model is not a good fit for work already happening on a background isolate. We're not blocking the UI here, so we can afford synchronous database IO and avoid the communication overhead. Opening a second database connection is fine, but opens you up to concurrency is…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@frankvollebregt
Comment options

@simolus3
Comment options

@frankvollebregt
Comment options

@frankvollebregt
Comment options

@frankvollebregt
Comment options

Answer selected by frankvollebregt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants