You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was debugging a performance issue with some bulk operation. On a hunch I turned off MiniProfiler and the performance difference was night and day. The total time spent in the operation dropped from 102 to 13 seconds, with ~6 seconds spend on the 19 sql operations (consisting of many insert/update).
After doing some profiling I found that all of MiniProfiler's time was spent in InlineFormatter:
I turned the formatting (mostly) off by setting options.SqlFormatter = null. Now I still get sql timings, but without all the work related to the formatting. I'm using MiniProfiler here in a command line utility and am only interested in the timings and not even looking at (un)formatted sql.
MiniProfiler.EntityFrameworkCore: 4.2.22
The text was updated successfully, but these errors were encountered:
Do you have an example query? Inline is not the default because it may even mess up a few more complicated queries (you simply can't do everything in-line that could be a parameter, it's a different superset). How big of a SQL string are we talking here? We can definitely look at optimizing, just hasn't come up before with numbers being that small and usage being relatively rare.
I was debugging a performance issue with some bulk operation. On a hunch I turned off MiniProfiler and the performance difference was night and day. The total time spent in the operation dropped from 102 to 13 seconds, with ~6 seconds spend on the 19 sql operations (consisting of many insert/update).
After doing some profiling I found that all of MiniProfiler's time was spent in InlineFormatter:
I turned the formatting (mostly) off by setting
options.SqlFormatter = null
. Now I still get sql timings, but without all the work related to the formatting. I'm using MiniProfiler here in a command line utility and am only interested in the timings and not even looking at (un)formatted sql.MiniProfiler.EntityFrameworkCore: 4.2.22
The text was updated successfully, but these errors were encountered: