Code Monkey home page Code Monkey logo

Comments (5)

bacongobbler avatar bacongobbler commented on August 12, 2024

Is this because users want to search for formula using github rather than an optimized search engine e.g. brew search? I saw this limitation too, but it doesn't seem to look like a problem with git, but moreso with searching for formulae on github.

Running time ls homebrew-core/Formula clocks in barely over a millisecond for me, for example:

><> time ls homebrew-core/Formula

...

real	0m0.015s
user	0m0.009s
sys	0m0.005s

Would it be better to lean users towards something like the search engine as implemented on https://crates.io/ instead? That might be a good solution to provide users a way to search against fish-food.

from gofish.

mattfarina avatar mattfarina commented on August 12, 2024

I couldn't find the reason for the structure when I went searching.

My thoughts were around maintainers for the apps in the repository. I didn't think of end users using it so much as those who need to maintain their apps.

My personal experience (just 1 person) is that many files in one directory become a pain. For example, when I want to edit a formula, in homebrew, it can be a pain. Try this, clone the homebrew Formula repo and then open it in visual studio code. Then try to edit something. Take the formula maintainers experience for a spin. This is where I've run into annoyances.

from gofish.

bacongobbler avatar bacongobbler commented on August 12, 2024

I found some very interesting data from a github engineer in a comment on cocoapods and having a flat file directory structure, similar to homebrew/fish-food: CocoaPods/CocoaPods#4989 (comment)

  1. Finally, the layout of the repo itself doesn't help. Specifically, the Specs directory, which contains 16k+ subdirectories, causes some Git operations to be unexpectedly expensive, further driving up CPU usage.

Longer-term, you should also consider points 1 and 4. Using GitHub as your CDN is not ideal, for anybody involved. I would urge you to consider how CocoaPods could be distributed without using Git operations, which are intrinsically hard to scale. I'm confident that you could come up with a more reliable approach for serving packages. Perhaps a method that is more similar to the approaches used by other packaging systems would work better.

If anyone has data/docs/source code on how cargo indexes their repository, that would be much appreciated, otherwise I'll have to carve out some time and have a look into this.

from gofish.

bacongobbler avatar bacongobbler commented on August 12, 2024

The CDN piece here isn't necessarily important considering that gofish doesn't host the package's release assets itself (though it might be something I would consider doing in the future), but homebrew uses bintray to host pre-compiled bottles so bintray is their effective CDN.

The takeaways from that thread are:

  • no action should be necessary for gofish install since it doesn't rely on git
  • gofish update and gofish upgrade are less frequent operations, so we should be well within a reasonable hit rate against github, though perhaps mirroring repositories may not be a bad option/contingency plan
  • we should continue to perform a full fetch on gofish init/gofish rig add because

It is usually preferable to pay the price of a full clone once, then incrementally fetch into the repository, because then Git is better able to negotiate the minimum set of changes that have to be transferred to bring the clone up to date.

  • figure out a better indexing option for fish-food similar to cargo, as that appears to be the more efficient option for git (unverified, but I'll trust his perspective) 😄

from gofish.

bacongobbler avatar bacongobbler commented on August 12, 2024

It looks like the original issue around traversing a directory with thousands of files on github's UI has since been resolved. Moving the rest of the repository discussion over to #130. Thanks @mattfarina for your suggestions!

from gofish.

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.