Commit 2f65b90
authored
dns: reserve vector capacity in ParseTxtReply
The chunks vector's upper bound is known before the loop starts
(str_count from ares_dns_rr_get_abin_cnt), so reserve the capacity
upfront to avoid unnecessary reallocations.
Signed-off-by: agape1225 <[email protected]>
PR-URL: nodejs#64978
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>1 parent 536aca7 commit 2f65b90
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
| 647 | + | |
647 | 648 | | |
648 | 649 | | |
649 | 650 | | |
| |||
0 commit comments