Ormlite very slow in debug mode

I run a selectmulti query over 5 entity but it take a very long time to complete.

        using var Db = dbConnectionFactory.OpenDbConnection();
        var q = Db.From<EntityA>()
                .LeftJoin<EntityA,EntityB>((EntityA, EntityB) => EntityA.Id == EntityB.Id)
                .Join<EntityA,EntityC>((EntityA, EntityC) => EntityA.Id == EntityC.Id)
                .LeftJoin<EntityA,EntityD>((EntityA, EntityD) => EntityD.Id == EntityA.Id )
                .LeftJoin<EntityA,EntityE>((EntityA, EntityE) =>EntityA.OriginalName == EntityE.Nome )
        Stopwatch stopWatch = new Stopwatch();
     var   tuples = Db.SelectMulti<EntityA, EntityB, EntityC,EntityD,EntityE>(q);

If I run in realease mode the code will return the result in few seconds…
There are some configuration to speed up Ormlite in debug mode?

Thanks a lots Gianmaria.

That’s nothing a library is going to have significant control over, although the more generics you use the more time is required by the JIT the first time the code is run/compiled and you’ve got a fairly heavy generic function there, but I’ve not known a debugger to take seconds for each line except for Mono’s soft debugger which can be excruciatingly slow.

What debugger are you using? If you’re not using Rider’s debugger I’d recommend trying it out, it’s an overall better performing IDE than VS which may be slowing you down. I’d also reset any custom settings like enabling Just My Code and make sure you’re debugging in Debug mode and suppress JIT optimization on module load.