Giter VIP home page Giter VIP logo

Comments (4)

ijt avatar ijt commented on May 20, 2024

Looking at the source code for the go test command, the computeTestInputsID function apparently computes the hash of every file that got opened during the first test run. That would explain why the time to run the test varies with the number of subtests being run (taking a slice) even for a cache hit. So it's possible that the overhead for computing all these hashes is making the tests slow on cache hits. If so, it might be possible to speed up that case by putting all the test data into a zip file.

from wire.

ijt avatar ijt commented on May 20, 2024

Update: I tried putting the testdata directory into a zip file and updating the test to work with that, but got no significant speedup on cache hits. It's puzzling.

from wire.

ijt avatar ijt commented on May 20, 2024

@zombiezen is saying the slowdown could be the result of the tests opening a bunch of Go standard library packages for type checking. go test would have to check the hashes of all those files to see if it's a cache hit, and that could take a while.

from wire.

ijt avatar ijt commented on May 20, 2024

This is not a wire issue. It's an issue in go test. See golang/go#26726.

from wire.

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.