2 ms·
This was fun to read through. I would need to profile the code, but the startup time being bad for Deno seems like maybe a combination of the code in here bein
by esprehn 4y ago
This was fun to read through.
I would need to profile the code, but the startup time being bad for Deno seems like maybe a combination of the code in here being unoptimized:
https://github.com/denoland/deno_std/blob/0ce558fec1a1beeda3ed7710c6507b9e991829c9/encoding/csv/_parser.ts#L138 https://github.com/denoland/deno_std/blob/0ce558fec1a1beeda3...
(Ex. Lots of temporaries)
And usage of the readFileSync+TextDecoder API instead of readTextFile (which is also a docs issue since it suggests the first one). It seems the code loads the 100MB into memory, then converts to another 100MB of utf8, then parses with that inefficient csv parser. The rust and go versions look to be doing stream/incremental processing instead.