The default message dumping can produce nicely formatted binary output for cro trace. That's nice, until we are building a single page application and spit out a 900KB JavaScript bundle, which it then spends an age nicely formatting into a hex dump. Ain't nobody gonna read that. So, let's put a maximum upper limit on it of 4096 bytes, and if there's more, just stick "[N bytes not displayed]" at the end. We can add a CRO_TRACE_MAX_BINARY_DUMP environment variable to let the user raise it if they should really want to, also.
Discovered because I was building an SPA and ran into it. :-)
The default message dumping can produce nicely formatted binary output for
cro trace
. That's nice, until we are building a single page application and spit out a 900KB JavaScript bundle, which it then spends an age nicely formatting into a hex dump. Ain't nobody gonna read that. So, let's put a maximum upper limit on it of 4096 bytes, and if there's more, just stick "[N bytes not displayed]" at the end. We can add aCRO_TRACE_MAX_BINARY_DUMP
environment variable to let the user raise it if they should really want to, also.Discovered because I was building an SPA and ran into it. :-)