I have a large form (20 fields) that is taking forever to block render in Django + bootstrap-toolkit, as it can be seen in the following graphs:
Also see this block breakdown graph.
What I've tried...
I'm out of ideas and need some outside perspective on how to work around this.
I got it loading much faster by doing the following.
I pre-rendered out the form with the zillion block requests.
Opened browser requested the form.
Copied the form HTML code.
Created new html file with the pre-render HTML form.
Changed the 'VIEW''s GET request to use the new pre-rendered form HTML. Added CRSF token just inside the form.
Response time was reduced from 5 seconds to .50 ms.
It's important to note you won't be able to use the cache decorated on that view. You can use the <% cache %> template tags on the new HTML file with the form.
Hope this helps!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.