Commit f4ae514
committed
perf: skip deep clone of message during streaming
During streaming, use a direct reference to the source message instead
of JSON.stringify comparison + JSON.parse deep clone on every token.
All mutation controls (edit, rate, feedback) are gated behind
message.done, so direct reference is safe during active streaming.
A deep clone is performed once when streaming completes.1 parent f1899da commit f4ae514
1 file changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
| 124 | + | |
123 | 125 | | |
124 | | - | |
125 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
126 | 135 | | |
127 | 136 | | |
128 | 137 | | |
| |||
0 commit comments