Do not create a new Buffer each we find a type that span buffers
pgriess opened this issue · comments
Peter Griess commented
Whenever strtok,parse.emitData()
is looking for some number of contiguous bytes, it allocates a new Buffer
object to hold them. This allocation is expensive. Instead, we should re-use a single global Buffer
instance, growing it as necessary.
Peter Griess commented
Keep a glogal buffer for types that span buffers.
Closed by d6178bf.
- Resize our static buffer if the current type requires more space.