bobthecow / genghis

The single-file MongoDB admin app
http://genghisapp.com
MIT License
1.45k stars 165 forks source link

Option to have all objets be collapsed by default? #141

Closed alexturpin closed 11 years ago

alexturpin commented 11 years ago

Hey folks,

I may be speaking for myself only here, but I think and option to have all objects be collapsed by default would be great. For example, you would only see the top level properties at a glance. I am getting some pretty long loadings when going into a collection because I have big objects. It would be a tremendous improvement to what is definitely the best web-based MongoDB admin interface out there.

P.S. I see a branch feature/collapser-performance, but it hasn't been touched in over a year and I'm not sure whether that was relevant.

Thanks

bobthecow commented 11 years ago

The collapser performance feature branch was, in fact, built to explore this problem. Unfortunately it's outdated and not a silver bullet :)

I'm reluctant to make something like this an option; Genghis should be smart enough to keep from doing anything by default that makes it sluggish. The right answer probably means some combination of heuristics for collapsing properties or entire documents. Something like:

See #12 for some discussion on the issue. A few things have been done since then (like the JSON printer rewrite, which uses drastically fewer DOM nodes), but it still needs work.

Please join the conversation on issue #12. I'll close this one as a duplicate.