Code Monkey home page Code Monkey logo

Comments (2)

isaacs avatar isaacs commented on June 26, 2024

I'm curious if you plan to keep the whole "nested shasum parts" thing. I noticed that the JS cacache spends a fair bit of FS ops on that, and it seems like most file systems in use today can handle bazillions of files in a single dir.

On my machine, I'm seeing about a 2-5% performance boost in all the benchmarks that are sensitive to bucket loading efficiency when I make it just use a single layer of files in one big index folder. Not revolutionary, but not nothing. I haven't yet run it through a benchmark that creates millions of buckets, so it's possible that it's A Bad Idea, of course :)

from cacache-rs.

zkat avatar zkat commented on June 26, 2024

I did a spike towards this and realized this is way more trouble than it's worth -- generally, if you want performance, cacache::read_hash(_sync) is the way to go, as it's just as fast as a regular filesystem read. Considering the general slowness is pretty much I/O bound, with only a bit of JSON parsing delay (and serde_json is very fast)... I think I'm just gonna go ahead and say this wouldn't be worth the trouble just to squeeze another couple of percentage points in.

from cacache-rs.

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.