Skip to content

"Complex Load" does not make much sense #16

@greenrobot

Description

@greenrobot

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions