Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non-preprocess build object cache #6108

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

star-hengxing
Copy link
Contributor

@star-hengxing
Copy link
Contributor Author

目前 cache 系统可以进一步扩展:

  • 最基本的 cache,只根据编译参数计算 cache key。
    • 可以预处理的文件,但目前没有实现,回退到最基本 cache key 计算。
    • 不需要预处理的文件,同上。
  • 根据不同 source kind ,cache key 的计算可以进一步优化。
    • build_cache.build 新增一个参数,用于定制 cache key 计算。
    • object 文件缓存命中会更新 mtime,如果要支持链接 cache 需要注意。
  • 大缓存对象优化。
    • 压缩
    • 使用文件链接避免拷贝。

参考:https://ccache.dev

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


The current cache system can be further expanded:

  • The most basic cache, only calculates the cache key based on compilation parameters.
    • Files that can be preprocessed, but currently not implemented, fall back to the most basic cache key calculation.
    • Files that do not require preprocessing, same as above.
  • Depending on the source kind, the calculation of the cache key can be further optimized.
    • build_cache.build adds a new parameter for customizing cache key calculation.
    • An object file cache hit will update mtime. If you want to support link cache, you need to pay attention.
  • Optimization of large cache objects.
    • Compression
    • Use file links to avoid copies.

Reference: https://ccache.dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants