Git Product home page Git Product logo

Comments (2)

andrey-malets avatar andrey-malets commented on August 20, 2024

I presented a draft of possible solution in #66: while doing direct cache search and going through a list of dependencies, we add an additional check that the input file is contained within this list. If the input file name is missing from the list, that that cache entry must have been constructed from a different source file (at least, from a different absolute/relative location as seen by compiler command line), and we avoid hitting it. This leads to the following:

All the entries with the same source file content "contend" for direct cache entry: for example, if we compile the attached code with patched version from clean checkout multiple times, then neither a/file.c nor b/file.c will hit direct cache, because after compiling a/file.c the cache entry will "point" to that file as a dependency, and the cache will miss compiling b/file.c thereafter, and vice versa: after compiling b/file.c the entry will point to that file, and if we begin another try with a/file.c, we again miss direct cache.

However, both items will be served by simple cache just fine, and if we do not "repoint" direct cache entry by compiling another file with the same content in-between, then every entry has a chance to hit direct cache too (e.g. double compilation of a/file.c alone will give direct cache hit as before).

I think this rare direct cache misses for source files with the same content are worth paying for possible false positives.

from dist-clang.

andrey-malets avatar andrey-malets commented on August 20, 2024

Fixed in #67.

from dist-clang.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.