Commit 1d4646d
authored
Speed up Docusaurus build (#146)
* Speed up Docusaurus build with Rspack, image compression, and CI caching
- Add @docusaurus/faster for Rspack bundler, SWC transpilation/minification,
Lightning CSS, MDX cross-compiler cache, and multi-threaded SSG
- Limit dev server to current version only for faster local development
- Remove babel.config.js (replaced by SWC)
- Add Docusaurus build cache step in CI workflow
- Upgrade Node from 20 to 24 in CI
- Compress 138 large PNG images with pngquant (65-80% quality)
* Compress PNG images over 100KB with pngquant
330 additional images compressed (quality 65-80%, skip-if-larger).
Reduces repository size and speeds up checkout, CI, and deployment.
* Pin actions/cache to full commit SHA
Required by org policy that all actions must be pinned to a
full-length commit SHA.
* Trigger CI
* Reduce Node heap to 4 GB to prevent OOM on CI runners
Rspack (which replaced webpack) runs as native Rust code outside the
Node heap. With 6 GB allocated to Node, peak memory reached 8.3 GB
total (Node + Rspack native), exceeding the 7 GB runner limit and
causing the Linux OOM killer to terminate the build. Setting the heap
to 4 GB leaves ~3 GB for Rspack and the OS.
* Add swap space to CI runner to prevent OOM kills
The Rspack build peaks at ~8 GB, exceeding the 7 GB runner limit.
Adding 10 GB swap prevents the Linux OOM killer from terminating the
build process.
* Fix swap setup: resize existing swapfile instead of creating new one
GitHub runners already have a 4 GB /swapfile in use. Disable it first,
then recreate at 14 GB to give enough headroom for the Rspack build.
* Restore Node heap to 6 GB now that swap prevents OOM kills
With 14 GB swap as safety net, the 6 GB heap allows V8 to GC less
aggressively, improving build performance. Brief memory peaks above
7 GB will use swap instead of crashing.1 parent 28d9609 commit 1d4646d
473 files changed
Lines changed: 684 additions & 7 deletions
File tree
- .github/workflows
- docs
- developer-guide/img
- user-guide
- agents-protocols/img
- domains/img
- gateways-and-devices/img
- manager-ui/img
- rules-and-forecasting/img
- versioned_docs
- version-1.10.0
- developer-guide/img
- user-guide
- agents-protocols/img
- domains/img
- gateways-and-devices/img
- manager-ui/img
- rules-and-forecasting/img
- version-1.11.0
- developer-guide/img
- user-guide
- agents-protocols/img
- domains/img
- gateways-and-devices/img
- manager-ui/img
- rules-and-forecasting/img
- version-1.12.0
- developer-guide/img
- user-guide
- agents-protocols/img
- domains/img
- gateways-and-devices/img
- manager-ui/img
- rules-and-forecasting/img
- version-1.13.0
- developer-guide/img
- user-guide
- agents-protocols/img
- domains/img
- gateways-and-devices/img
- manager-ui/img
- rules-and-forecasting/img
- version-1.14.0
- developer-guide/img
- user-guide
- agents-protocols/img
- domains/img
- gateways-and-devices/img
- manager-ui/img
- rules-and-forecasting/img
- version-1.15.0
- developer-guide/img
- user-guide
- agents-protocols/img
- domains/img
- gateways-and-devices/img
- manager-ui/img
- rules-and-forecasting/img
- version-1.16.0
- developer-guide/img
- user-guide
- agents-protocols/img
- domains/img
- gateways-and-devices/img
- manager-ui/img
- rules-and-forecasting/img
- version-1.17.0
- developer-guide/img
- user-guide
- agents-protocols/img
- domains/img
- gateways-and-devices/img
- manager-ui/img
- rules-and-forecasting/img
- version-1.18.0
- developer-guide/img
- user-guide
- agents-protocols/img
- domains/img
- gateways-and-devices/img
- manager-ui/img
- rules-and-forecasting/img
- version-1.2.0
- developer-guide/img
- user-guide
- agents-protocols/img
- domains/img
- gateways-and-devices/img
- manager-ui/img
- rules-and-forecasting/img
- version-1.3.0
- developer-guide/img
- user-guide
- agents-protocols/img
- domains/img
- gateways-and-devices/img
- manager-ui/img
- rules-and-forecasting/img
- version-1.4.0
- developer-guide/img
- user-guide
- agents-protocols/img
- domains/img
- gateways-and-devices/img
- manager-ui/img
- rules-and-forecasting/img
- version-1.5.0
- developer-guide/img
- user-guide
- agents-protocols/img
- domains/img
- gateways-and-devices/img
- manager-ui/img
- rules-and-forecasting/img
- version-1.6.0
- developer-guide/img
- user-guide
- agents-protocols/img
- domains/img
- gateways-and-devices/img
- manager-ui/img
- rules-and-forecasting/img
- version-1.7.0
- developer-guide/img
- user-guide
- agents-protocols/img
- domains/img
- gateways-and-devices/img
- manager-ui/img
- rules-and-forecasting/img
- version-1.8.0
- developer-guide/img
- user-guide
- agents-protocols/img
- domains/img
- gateways-and-devices/img
- manager-ui/img
- rules-and-forecasting/img
- version-1.9.0
- developer-guide/img
- user-guide
- agents-protocols/img
- domains/img
- gateways-and-devices/img
- manager-ui/img
- rules-and-forecasting/img
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
26 | 37 | | |
27 | 38 | | |
28 | 39 | | |
29 | 40 | | |
30 | 41 | | |
31 | 42 | | |
32 | | - | |
| 43 | + | |
33 | 44 | | |
34 | 45 | | |
35 | 46 | | |
36 | 47 | | |
37 | 48 | | |
38 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
39 | 60 | | |
40 | 61 | | |
41 | 62 | | |
| |||
This file was deleted.
0 commit comments