Closed b5 closed 3 years ago
I could drop it. How's 40 characters feel? could come in handy with datasets that have many string columns
40 feels good. If it is unclear what the field is after that it probably isn't meant to be read in an overview/at a glance.
Turns keys in string frequency stats that are longer than 80 characters from the full value being into a string of the first 80 characters truncated +
... X chars
. Does this onClose
, so it only affects the final output.This prevents string stat frequencies from blowing up preview sizes. The result here is admittedly a little controversial, as we need to cover a specific edge case: truncating strings can cause keys to collide if the only differences between two frequency values occurs after the first 80 characters. This is helped somewhat by templating in the length of the string, but doesn't handle the case where two strings of the same length differ only after the first 80 characters. For that reason I've added the index of the bucket in paranthesis after the character count. Given that the package that produces these stats sorts keys from most to least frequent, the number corresponds with frequency rank.
Without this I was seeing previews with 1Mb+ stats components. Both bulky & unhelpful.