support icon indicating copy to clipboard operation
support copied to clipboard

[Feature] Load docs in Pybricks Code as zip archive

Open laurensvalk opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. Pybricks Code takes quite a long time to fully load, or load new versions.

A lot of time is spent downloading a large amount of small files for the documentation.

Maybe this could be downloaded as a zipped archive and unpacked locally?

image

We can probably also avoid shipping the .txt files for the docs since the source is available on GitHub anyway.

laurensvalk avatar Mar 21 '24 20:03 laurensvalk

Some less impactful things we can do to reduce requests:

  • Drop the .txt files. Since our sources are public and most info is in the .py files, we don't really need these.
  • Embed the block .svg files in the html.

laurensvalk avatar Feb 25 '25 12:02 laurensvalk

This cuts the number of files in the docs html from 527 to 156, a reduction of 70%.

For the total Pybricks Code distribution, this is estimated at 371/852 = 43% reduction in the number of requests, which is nice.

laurensvalk avatar Feb 26 '25 10:02 laurensvalk