malj / django-parcel-ssr

Django server side rendering, powered by Parcel bundler
31 stars 7 forks source link

Default React example takes 30s between making URL request and rendering? #4

Closed jness-maximus closed 3 years ago

jness-maximus commented 4 years ago

Created a sample project using the guidelines in the README. When I load the url for my react_view (using the uber simple react template view in the README), the first hit of the page takes around 30s to load. Every subsequent refresh of the page also takes 30s to load. In contrast, regular Django views load almost instantly. No other Django settings have been changed. Notably, this computer is pretty top of the line so it's not a hardware performance issue.

This seems like a rather long time to render the page. Any thoughts on what might be causing this?

(As a side note, running a somewhat more involved project that integrates TypeScript/React Router/Redux also has the same hit to load, roughly about 30s, so I seem to be hitting similar behavior regardless of complexity or packaging...?)

malj commented 4 years ago

Sounds like Parcel is the bottleneck - how many bundles do you have? There is caveat in the docs to avoid placing non-entry point component files in the bundles/ dir, because each file found there will produce a separate Parcel bundle.

jness-maximus commented 4 years ago

Actually the only file in the bundles dir is the default example listed in the README. (the component with the simplified "count" mechanism).

malj commented 3 years ago

Closing for inactivity.