you can already define how deeply you want to unfold initially. from the example, this will only unfold 1 level deep:
you should be aware, though, that the library currently does NOT stop recursion at that depth, it always dumps everything and builds the full HTML. this parameter only sets the necessary CSS to hide deep stuff from you on initial render. i was considering adding an option that would in fact stop the recursion, and not render the rest of the object, leaving you unable to unfold it later. as for the performance, i'm not sure if what you're seeing is just the browser's sluggish HTML rendering of such a huge DOM structure (this would cause slow interactive folds/unfolds also), or the library itself taking a long time to digest the object. i dont see anything that can be done about slow DOM performance unfortunately, except falling back to rendering a
with the contents of either var_dump() or print_r() past a predefined depth - but that aint pretty - i'd rather just not render anything. the object analysis itself i have not benchmarked but i tried not to leave too many low hanging fruit there while still maintaining the useful stuff.
can you give me an idea of size and format of the structure you're dumping and into which browser? maybe a specific analysis function is taking a disproportionately long time. i've personally dumped some pretty large stuff without experiencing noticeable slowness.