sebastienros/yessql

BatchCommand.DefaultBuilderCapacity is not used

Opened this issue · 5 comments

PiemP commented

Good day to everyone.

Today I have initialized a new OrchardCore site and I have see this line in the logging file:

YesSql|The default capacity of the BatchCommand StringBuilder 10240 might not be sufficient. It can be increased with BatchCommand.DefaultBuilderCapacity to at least 41448

I have search about it but I don't find any information. This should be worry me?

Thank you

logger.LogWarning("The default capacity of the BatchCommand StringBuilder {Default} might not be sufficient. It can be increased with BatchCommand.DefaultBuilderCapacity to at least {Suggested}", DefaultBuilderCapacity, command.Length);

It's actually a useless warning because the DefaultBuilderCapacity constant is not even used. I believe it was intended for a StringBuilder but the current logic is just concatenating all the queries into a single one (probably using an SB though).

PiemP commented

Thank you guys,

I can close this question or you prefer that I leave it open?

I renamed it so we can leave it open

Shall we remove this warning Seb?