This whole sparse_rawlen function seems like it could just be deleted. With this fix, we're at best saving a few bytes by not just allocating [3]uv_stdio_container_t every time, and at worst over-allocating when the stdio table has more than 3 integer keys.
It also seems like we might not even need heap allocation for options.stdio?
Really, this whole stdio related code seems a bit convoluted/buggy, so maybe a separate PR focusing on cleaning it up would be warranted.
Originally posted by @squeek502 in #799 (comment)
This whole
sparse_rawlenfunction seems like it could just be deleted. With this fix, we're at best saving a few bytes by not just allocating[3]uv_stdio_container_tevery time, and at worst over-allocating when thestdiotable has more than 3 integer keys.It also seems like we might not even need heap allocation for
options.stdio?Really, this whole stdio related code seems a bit convoluted/buggy, so maybe a separate PR focusing on cleaning it up would be warranted.
Originally posted by @squeek502 in #799 (comment)