Issue Task Closed

#92059Message->isValidHeaderValue uses inefficient string parsing

Claus Due 08/20/20, 17:53 updated 05/04/21, 08:08

Description

Message->isValidHeaderValue currently uses a combination of “for”, “strlen” and “ord” on individual substring offsets to iterate over the bytes of a string.

This is possible to achieve with “unpack” which reduces memory usage and random substring access. Potentially saving thousands of calls to “ord” and one call to “strlen” per header.

Reviews 2