Files
nuclei/pkg
Dwi Siswanto 8e535f625d fix(http): cache resp strings to reduce memory allocs (#6679)
Prev, `FullResponseString()`, `BodyString()`, and
`HeadersString()` were called multiple times per
HTTP response iteration, each call allocating a
new string copy of the response data.

For a 10MB response, this resulted in ~60MB of
redundant string allocs/response (6 calls x 10MB).

Cache the string representations once per `Fill()`
cycle and reuse them throughout the response
processing loop. This reduces allocs from 6 to 3
per response, cutting memory usage by ~50% for
response string handling.

Profiling showed these functions accounting for
~89% of heap allocs (5.7GB out of 6.17GB) during
large scans.

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-12-10 18:25:18 +07:00
..
2025-09-22 21:49:56 +05:30
2025-09-12 19:03:56 +02:00
2025-10-10 17:32:54 +02:00
2025-12-06 11:19:27 +04:00
2025-12-07 05:51:53 +00:00
2024-03-15 00:01:09 +01:00
2025-11-18 22:20:17 +04:00
2025-10-10 17:32:54 +02:00
2025-10-10 17:32:54 +02:00
2025-11-18 22:20:17 +04:00
2025-12-07 05:51:53 +00:00
2025-12-05 07:22:31 +01:00