Replies: 2 comments 1 reply
-
Why is your storage slow in the first place? Why would you want to only use a fast storage for JS files, and keep everything else on a slow storage? You should put everything on fast storage (CDN), and not just the JS files.
We do that on purpose, because putting everything in a single file would actually slow down your whole site by requiring to load much more JS for every single page of your site. Imagine you have a heavy playground on page All this would lead to slower hydration for React, and some items could eventually stay as not interactive for a while due to the bundle size (ie: buttons that you can't click for a few seconds). Also, I don't understand how having less files (1 or 2) would contribute to the outcome you look for. You can as well put "all the small files" on a fast storage. It's not clear to me what outcome you are looking for here. Is it only to speed up your site or are there other reasons? If you are looking to speed up your site, what you try to do is not the way to achieve that outcome. |
Beta Was this translation helpful? Give feedback.
-
I have a simple product intro website using docusaurus now I have put in online but speed is not good the easiest way to make it faster I can think of is put some big static files on another faster storeage like some OSS service(Object Storage Service) actually I already put images , css in the OSS, and link it from my index page the problem is , for the js, i found out from index page , only link 2 js files , but actually there are many, so I need to bundle all js together , then I can put it on OSS service and link to it the reason I don't want to bother other solution like CDN or mirror site is because my website is very simple , most content is on index page , so I only want to make my index page load faster , I don't want to make it complex by using cdn or other solution. |
Beta Was this translation helpful? Give feedback.
-
since I want to put the js file into some faster storage ,and link to it from my site
now js is split into a few files , and load at runtime
I need to disable this runtime feature , and bundle all js into one file , maybe 2 also fine , but no runtime loading
Beta Was this translation helpful? Give feedback.
All reactions