Closed weichaohh closed 11 months ago
Hi weichao! Thanks for your interest in Ocelot gateway!
Could you correct your English text description please? It is hard to read it!
In general I understand the issue, but we need to work on description and user scenario to accept the issue.
Do you have some draft solution with a fix?
Hi Thanks for your reply, Sorry, my english leve very low.
I have a large number of iot,they post real time data to the platform. every time convert client request httpcontent to destination must use memStream.ToArray()
to allocate new new byte[]
. this will increase the burden of GC.
I found that YARP → StreamCopier.cs use ArrayPool<byte>.Shared
to copy stream, that can buffer byte[]
, so reduce GC. I think this is a good choice
Yes, this is a good choice! Are you going to create a PR to fix this problem? Have you provided some performance tests and/or comparison of YARP and Ocelot?
@ggnaegi Gui, the author doesn't want to fix and closed the issue 😄 What will we do? So, because we're close to finishing and you're working on #1724 , I've decided to reopen this issue. OK?
Ok @raman-m could you assign me? Thanks!
Ok @raman-m could you assign me? Thanks!
You're assigned.
Expected Behavior / New Feature
File: RequestMapper.cs Method: Task<HttpContent> MapContent(HttpRequest request) Line:
There are performance issues. Maybe Can change to use
ArrayPool
like YARP, This can reduce GCbyte[]
.