'Should I use ObjectBox in a separate isolate so as not to block UI thread?

I'm going to use ObjectBox in my Flutter project. But I noticed that the get method is synchronous. So should I use ObjectBox in a separate isolate to avoid blocking the UI thread?



Solution 1:[1]

There's rarely a need to do so. ObjectBox achieves hundreds of thousands of read objects per second on mobile so you should be fine unless you're doing something very excessive.

Solution 2:[2]

objectbox-dart v1.4.0 adds Store.runIsolated to run database operations (asynchronous) in the background. https://github.com/objectbox/objectbox-dart/releases/tag/v1.4.0

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 vaind
Solution 2 Ilya Berezovsky