Make reference.zip smaller
Mantenedores costumam responder em até 1 dia
@runemadsen já está trabalhando nisso.
Desde 27/1/2023.
Avaliação
Esta issue ainda não foi avaliada.
Descrição
As mentioned in https://github.com/processing/processing-website/issues/213, we need to make the reference.zip file smaller so people with low connection speeds can download it fairly fast. Here's what I wrote in the parent issue:
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.
- Linguagem predominante
- MDX
- Estrelas
- 91
- Forks
- 121
- Merge médio
- 1h 15min
- PRs com merge (30d)
- 5
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de processing/processing-website
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
processing/processing-website#716 ·
Mantenedores costumam responder em até 1 dia
-
Missing isLooping documentationTalvez já em andamento @sharadvc assumiu há 23 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
processing/processing-website#703 ·
Mantenedores costumam responder em até 1 dia
-
Typo in frameCount documentation pageTalvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. AbertaGood First Issue Help Wanted Reference
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
processing/processing-website#698 · 5 comentários · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
Some links in package.json still link to the DSI repo and should be updated.Talvez já em andamento @sharadvc assumiu há 23 dias. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 72/100
processing/processing-website#681 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
download link doesn't link to downloadsTalvez já em andamento @sharadvc assumiu há 23 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
processing/processing-website#646 · 3 comentários ·
Mantenedores costumam responder em até 1 dia