How to speed up file writing from fipp?

Previous conversation: https://github.com/brandonbloom/fipp/issues/47

The problem was likely with-out-str is taking all the data in the memory, which made it slow to emit the code to file. system.

Then I created an example in ClojureScript compiled with shadow-cljs, here’s details:


https://clojurians.slack.com/files/jiyinyiyong/F6CMBB7M4/main_cljs.txt
http://repo.tiye.me/gist/investigate-fipp/

But I can’t figure out what’s wrong here. How to look into ClojureScript deep stacktrace?