-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit 3418c6c
committed
fix(core): Improve StreamString::readBytes() speed with large buffers
Using `StreamString` on large buffers causes large movements of memory data when reading which can cause the TWDT to trigger, heap fragmentation or crash due to allocation failures.
`StreamString` is definitely slower than cbuf.h for large buffers.
Explanation of the issue with a small MRE: ESP32Async/ESPAsyncWebServer#148 (comment)
This issue was discovered in the OpenDTU project : tbnobody/OpenDTU#2535 1 parent b333bf2 commit 3418c6c
2 files changed
+21
-0
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
56 | + | ||
57 | + | ||
58 | + | ||
59 | + | ||
60 | + | ||
61 | + | ||
62 | + | ||
63 | + | ||
64 | + | ||
65 | + | ||
66 | + | ||
67 | + | ||
68 | + | ||
69 | + | ||
70 | + | ||
71 | + | ||
72 | + | ||
73 | + | ||
74 | + | ||
75 | + | ||
56 | 76 |
| |
57 | 77 |
| |
58 | 78 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
34 | + | ||
34 | 35 |
| |
35 | 36 |
| |
36 | 37 |
| |
|
0 commit comments