X2CommunityCore / X2ModBuildCommon

An improved XCOM 2 mod build system
MIT License
5 stars 5 forks source link

Asset cook "is needed" check ala shader cache #15

Open Xymanek opened 3 years ago

Xymanek commented 3 years ago

A cooker invocation when all cooked packages are up to date with the original ones is quite quick (it doesn't actually do anything, unlike the shader compiler) but it still takes some time and is i/o dependent as it needs to scan all packages in sdk + mod. Instead, we could do a timestamp check on the mod's files inside ContentForCook and skip the invocation if none of them have changed (similar to how the shader cache skipping works).

However, since cooking can produce multiple files (and some, but not necessarily all, could be manually deleted between the builds) deciding what to reference when doing the comparison is much more complicated

Related: #12