Giter Site home page Giter Site logo

Comments (6)

stong1994 avatar stong1994 commented on July 25, 2024

In your case, ghq traverses all repositories three times, and I'll explain why:

Firstly, before getting or updating a repository, ghq traverses all repositories to determine if a specific repository exists.

Secondly, after getting or updating a repository, ghq attempts to match the repository with the provided URL. However, it matches the repository's subpath, which results in not finding a match.

Lastly, ghq parses the URL provided by the user and uses the parsed information to match the repository, where it succeeds in finding a match.

Overall, the execution time of the ghq get -l command is approximately three times longer than the ghq get command.

from ghq.

davinkevin avatar davinkevin commented on July 25, 2024

Thank you for the explanation.

However, don't you feel 7 secs is reasonable? Does that depend on the number of repository I've already checked-out?

from ghq.

stong1994 avatar stong1994 commented on July 25, 2024

I have created a PR here to ensure that it scans all repositories only once in your scenario. By the way, how many projects do you have? I have dozens of projects, and it only takes me 40 milliseconds to scan them.

from ghq.

davinkevin avatar davinkevin commented on July 25, 2024

Thanks.

I would say I have more, but how can I count that?
Due to groups in GitLab, I can't just count folders.
It should be around ~60 maximum, so not something very big.

Is ghq affected by other things stored in $GHQROOT root? I just discovered I have pkg/mod folder from a golang env I've setup some times ago.

image

And it contains… ~60k folders 😅.

from ghq.

stong1994 avatar stong1994 commented on July 25, 2024

You can use this command to display the projects:

ghq root --all | xargs -I {} fd --type d --max-depth 4 --hidden .git {} | sed 's/\/\.git//'

And, I think pkg should not under the workspace 🤔

from ghq.

davinkevin avatar davinkevin commented on July 25, 2024
image

I think --max-depth 4 reduces the list, because I have groups inside group with GitLab, then we filter some.
But it should be approximatively that…

about pkg, I'll give it a try tomorrow by (re)moving it somewhere else and see if it's fater.

from ghq.

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.