contentlayerdev / contentlayerdev/contentlayer

Internal: Performance improvements for `getConfig`

未关闭
#158 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
meta: never-stale topic: performance
主要语言
TypeScript
星标
3.5k
派生
192
PR 合并指标
30 天内没有已合并 PR

描述

`getConfig` is currently a performance bottleneck and should be improved if possible.

Some ideas:

- Short-circuit esbuild generation if "nothing has changed"
- Do "optimistic file-checks" i.e. only check for file existence as part of error handling path to not slow down the critical path (e.g. when checking for existence of `contentlayer.config.ts`)
- Resolve Contentlayer version at compile time instead of dynamically
- Investigate ways to speed up the `import-compiled-contentlayer-config` step

image

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。