Skip to content
代码片段 群组 项目
未验证 提交 3a7a35fb 编辑于 作者: Mark Florian's avatar Mark Florian
浏览文件

Add LRU-like behaviour to incremental compilation

This adds least-recently-used-cache-like behaviour to the incremental
webpack compiler. The `DEV_SERVER_INCREMENTAL_TTL` environment variable
now determines the number of days that page bundles are considered
"recent", and should be eagerly compiled. This number represents the
trade-off between lazy/eager compilation versus low/high memory
consumption of the webpack development server. A higher number means
fewer pages needing to be compiled on demand, at the cost of higher
memory consumption. A lower number means lower memory consumption, at
the cost of more pages being compiled on demand. A value of `0` means
that all pages in your history, regardless of how long ago you visited
them, are eagerly compiled.

This also makes the compiler record a history of visited pages even when
disabled, so that if and when it _is_ enabled, that history can still be
used to inform the LRU cache.

The history-recording function is explicitly disabled in the case that
webpack is running in CI.

Part of https://gitlab.com/gitlab-org/gitlab/-/issues/300412.
上级 e1d1bcda
No related branches found
No related tags found
加载中
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册