Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Implement incremental compilation #79

@MysteryBlokHed

Description

@MysteryBlokHed

Right now, Databind will recompile every file in a project when built, even though it's unlikely that every file in a project has changed. In large projects, this can be a significant problem. I'm not certain how other incremental compilers make sure to only recompile changed files, but doing something like creating a .databind folder in a project's root with the SHA256 hashes of files could work.

In an example implementation, the following tree:

src
└──data
    └──namespace
        └──functions
               main.databind

would result in the following .databind folder:

.databind
└──src
    └──data
        └──namespace
            └──functions
                   main.databind.info

Before file's signatures are checked, the file modification date should be checked. There's no reason to check the hash of a file if it hasn't been modified. This could be stored in the same file as the hash, resulting in the following contents for main.databind.info:

e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 1626831659

Where e3b0c442... is the file's hash, and 1626831659 is the file's modification time in seconds.

Metadata

Metadata

Labels

enhancementNew feature or requestsourceAffects the project's source

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions