Skip to content

Tests bind EF in a different lifecycle to the other frameworks #4

@lukemcgregor

Description

@lukemcgregor

I'm always a bit skeptical when I see differences of more than a factor 2 when looking at benchmarks. In reality most frameworks are pretty close in performance with the exception of edge cases around specific functionality.

I think that your specific 3-6x slower figure is coming from the way you manage your lifecycle.

https://github.com/ppanyukov/EntityFrameworkBenchmarks/blob/master/src/EntityFrameworkBenchmarks/Startup.cs#L22-L29

You are using a completely different type of lifecycle (transient vs singleton) for EF and dapper. This means (amongst other things) you are creating a new connection when querying EF and reusing the connection with dapper.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions