Hi, I have a demanding on last P4 ide.
I think it’s better to put the new reference accessible offline when you press Ctrl-F like on P3. Some people don’t have a connection and it’s a important tool for learning. Some time I program without connection to avoid distraction and some class and teacher don’t have a permanent web acess for budget or security reason.
Thanks
Hi @matheplica ,
You are right and this is a known issue:
Since the start of the project, we’ve included an offline copy of the reference with the software, which powers “Find in Reference” and the links in the Help menu. This is especially helpful/important for people with lower internet availability (i.e for situations where internet is disconnected, slow, or expensive).
With the site redesign launched in 2021, the size of the reference.zip file has jumped from 4.2 MB to about 100 MB, which means it no longer makes sense to include it with the download. For 4.0 beta 9, we’re removing the offline reference (because it’s out of date) and linking to the online reference until we have a better solution that can produce a custom (and compact) offline reference like we had for 1.x – 3.x.
This is a high priority for us. Certainly many people had no idea that this exists, but there are also many people who relied on this quite a bit, particularly those in important communities for us (outside the US, limited internet resources, and so on).
Source:
opened 10:48AM - 02 Aug 22 UTC
closed 12:09PM - 27 Nov 22 UTC
Since the start of the project, we've included an offline copy of the reference … with the software, which powers “Find in Reference” and the links in the Help menu. This is especially helpful/important for people with lower internet availability (i.e for situations where internet is disconnected, slow, or expensive).
With the site redesign launched in 2021, the size of the `reference.zip` file has jumped from 4.2 MB to about 100 MB, which means it no longer makes sense to include it with the download. For 4.0 beta 9, we're removing the offline reference (because it's out of date) and linking to the online reference until we have a better solution that can produce a custom (and compact) offline reference like we had for 1.x – 3.x.
This is a high priority for us. Certainly many people had no idea that this exists, but there are also many people who relied on this quite a bit, particularly those in important communities for us (outside the US, limited internet resources, and so on).
2 Likes
Ok, it’s good to know.
Let’s wait now.
Thanks for reply
1 Like
The offline reference will be back in the next release as downloadable content:
We are working on making it smaller too:
opened 11:47AM - 06 Aug 21 UTC
We need to create a `reference.zip` file during the build process that the Proce… ssing IDE can download when needed. This issue actually covers two main things:
- [ ] Create the `reference.zip` file during build
- [ ] Minimize the size of the `reference.zip` file
As far as minimizing the size of the `reference.zip` file, I have done some research to figure out next steps, and some work has already been done to fix some things. However, there are plenty of more short-term and long-term work to do.
As a quick explanation of the current bundle size: Gatsby prioritizes speed and size of *loaded content* over bundle size, which is great for serving over the web, but not so great if the size of the *stored content* matters. One example of this is that the same page content is saved in the HTML files and page-data JS files, but only one of those files will be loaded by the user depending on whether it's the initial load (HTML) or link navigation (page-data). But both are obviously contributing to the bundle size, even though some of this is de-duplicated by the zipping algorithm. On top of this comes things like responsive images, which produces 3-4 versions of each image in the final bundle, but works in the same way: Only a single image is loaded, but all of them are in the bundle. So in some way, we're going to need to fight Gatsby a bit to get the best of both worlds.
Here are some short-term things we can do:
- Remove all .map files. Easy. Little effect on bundle size
- Remove fake german translation pages. Easy. Large effect on bundle size (I need to check if this has already been done)
- Make a separate build with responsive images disabled. More work. Medium effect on bundle size.
I did a quick test of these things:
- I removed the fake German translation and .map files, and this resulted in a 60MB ZIP file. Since we don't have any translations on the site right now anyway, I think we should do this. We can then try to make the translations less heavy when we have one ready to go, but each translation is basically duplicating the site.
- I did another test where I removed some of the responsive images, and I could shave further 10MB off this. I need to look more into it, but I think it will save space.
- I tested zipping the site without images, which resulted in a 20MB file. This is not super good, but taking the thousands of generated files into account, not horrible either.
We might find more when we start working through these things, but the 50-60MB ZIP file seems very doable. We also need to localize some things, like not relying on the P5.js CDN version, but that's trivial. The longer term work will be going through the code with this constraint in mind and template by template looking at the file sizes and what optimizations can be done. This can save a lot of space based on the way Gatsby works, but I'm not sure how much and it'll take a bit more time.
1 Like