mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-10-20 05:56:56 +00:00
perf(sse): reuse the data-line buffer across events in readSSE
This commit is contained in:
@@ -164,7 +164,7 @@ func readSSE(r io.Reader, fn func(sseEvent) error) error {
|
|||||||
// suite, the SSE streaming path); tools/yaegi-check never exercises
|
// suite, the SSE streaming path); tools/yaegi-check never exercises
|
||||||
// a live streaming response.
|
// a live streaming response.
|
||||||
event = ""
|
event = ""
|
||||||
dataLines = nil
|
dataLines = dataLines[:0]
|
||||||
hasData = false
|
hasData = false
|
||||||
dataBytes = 0
|
dataBytes = 0
|
||||||
if !fire {
|
if !fire {
|
||||||
|
|||||||
Reference in New Issue
Block a user