Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
"Complex Load" does not make much sense #16
The tests for "load" in the "complex trial", loads 50 address books and then walks along the relations potentially resolving them on the fly (doing database requests). I had a closer look why DbFlow takes just a few milliseconds (usually single digit) while all others take hundred of milliseconds. I think the test set up is questionable: after inserting the entities, they stay around in memory initialized with all relations already set up for DbFlow. So what happens is that DbFlow makes a single query and is done, while others must hit the database multiple times. So you test rather caching than loading. I could send a trivial PR for greenDAO in order to make the same caching work, which would also result in single digit ms test runs.
However, I'd rather propose to clear all caches before doing the complex load test to actually benchmark loading. For greenDAO, you can clear the memory "cache" using daoSession.clear(). I don't did not find the equivalent in DbFlow, so I could not try myself.