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

Cache for built assets #85

Open
Laupetin opened this issue Jan 13, 2024 · 0 comments
Open

Cache for built assets #85

Laupetin opened this issue Jan 13, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Laupetin
Copy link
Owner

Currently, everytime the linker runs it builds every asset entirely new from its source material.
This can include parsing source files, processing them and converting the data to the target game.

This process can be shorted for some assets by caching the resulting asset and only processing the input again, if itself or one of its included files was changed (e.g. for menus).

This process however is only worth doing on assets that take a considerable amount of effort to build.
For example caching something like stringtables would probably not grant any noticable performance increase.

Depending on how the assets are parsed this cannot happen on an "per asset" basis though.
For example menus must be cached on a per file basis, since one file can include a menulist or 0,1,* menus.

For file based sources the caching can check for changes by just considering the filesystem's last modified timestamp (This is also how MSVC seems to do it).
For gdt based sources it will probably be necessary to use a checksum like CRC.

It is important to consider all source files for an asset instead of just the entry file.
For example a menu can be located inside file X which included file Y however, which defines a macro.
In this case, the cache must be considered dirty, even when only file Y changes.

@Laupetin Laupetin added the enhancement New feature or request label Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant