cdklabs / construct-hub-webapp

React web app for Construct Hub
Apache License 2.0
21 stars 11 forks source link

cdktf-snowflake takes hangs UI when loaded #703

Open eladb opened 2 years ago

eladb commented 2 years ago

Page takes about 20s to load and during that time UI is blocked.

https://constructs.dev/packages/cdktf-snowflake/v/0.0.4?lang=typescript

eladb commented 2 years ago

The hot path is markdown rendering and it is caused by the fact that this module has a huge README. They basically generate the API reference and plug it into the README.

https://github.com/bcgalvin/cdktf-dbt-snowflake/blob/main/README.md

eladb commented 2 years ago

We could add some protection against huge README files and basically just indicate that the README is too large to render or something like that.

@addihorowitz @gabewomble any thoughts?

gabewomble commented 2 years ago

This would take us full circle! We used to have a protection against readme's greater than a megabyte in size. We removed that when we started breaking apart the API reference, but it looks like in this case, the README includes a massive api reference along with the generated API reference

github-actions[bot] commented 2 years ago

This issue is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon.

Chriscbr commented 2 years ago

Mmm I'm wondering if it would be okay if we just only applied the size limit protection against the "README" section of the markdown file, and not bothering checking against the API reference section of the markdown file (since we're currently OK with that section being large).