day8 / re-frame-10x

A debugging dashboard for re-frame. X-ray vision as tooling.
MIT License
634 stars 68 forks source link

Bounded, more efficient pprint function #53

Closed danielcompton closed 6 years ago

danielcompton commented 7 years ago

When printing the tags for a trace, some of them may get very large. As a quick and dirty fix for #52 before that is completed, a bounded pprint function could be created. This would be the same as pprint, but when printing each top-level keys value, it would only print the first (say) 200 characters, and if the limit was hit, add a trailing elipsis.

This would be more efficient than our current implementation which pprints the entire datastructure, then trims the string. It would also be more useful as it would show at least part of each key, rather than one big value dominating the rest of the string.

Another option to do perhaps in conjunction with the idea above is to use fipp as it is much faster. We still want to not print the whole string though, as the string might get way too big.

danielcompton commented 6 years ago

Not so important anymore, as we have other ways of looking at this information.

danielcompton commented 6 years ago

We need this in other perspectives, like the event code panel. With the new code tracing stuff, large app-dbs can really slow things down.

danielcompton commented 6 years ago

Fixed in 0.3.2 release.