Improve UPDATES query for Platform#2132
Conversation
| { | ||
| var results = new World[count]; | ||
|
|
||
| var ids = new int[count]; |
There was a problem hiding this comment.
Given how small this array is, could we stackalloc it?
There was a problem hiding this comment.
Right here probably (I had tried on the update method at first), there is a MemoryExtensions method to do that on spans.
There was a problem hiding this comment.
Got confused by the diff but we can't do this in the updates scenario because we need to pass the ids array as a parameter.
There was a problem hiding this comment.
Npgsql supports ReadOnlyMemory<byte> (and I think of char too?), though IIRC it doesn't support mapping arrays of arbitrary types via ROM - might be worth trying just in case I'm misremembering.
(ArrayPool sounds good if not!)
|
@sebastienros I've opened a new pull request, #2145, to work on those changes. Once the pull request is ready, I'll request review from you. |
No description provided.