Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add a way to cache modules per-version #207

Open
DarkIntaqt opened this issue Jan 31, 2025 · 3 comments
Open

[Feature Request] Add a way to cache modules per-version #207

DarkIntaqt opened this issue Jan 31, 2025 · 3 comments

Comments

@DarkIntaqt
Copy link

By adding a request cache for a module per its version, the code execution time would decrease immensely for known packages.
This could be an optional flag.

@BePo65
Copy link
Collaborator

BePo65 commented Feb 1, 2025

What would you like to cache? As we don't know in advance what information the remote repository will return, IMHO we must request the server ever time again. Even if some information won't change, some will (e.g. latest available version).

Or perhaps I simply didn't understand your idea 😄.

@DarkIntaqt
Copy link
Author

Yeah so I took a look at the returned data from the registry and it looks like it's probably not the best idea to cache that and this issue can probably be closed.

Overall, I thought that when using [email protected] the author, license and such shouldn't change within in the same version, so it could be possible to cache those. I was looking for a way to speed up pipelines, as I use license-report for a project of mine which uses a lot of packages.

@BePo65
Copy link
Collaborator

BePo65 commented Feb 3, 2025

AFAIK most of the time is spend on creating a connection to the remote repository. So it will not make much of a difference, if we get more or less data from the server. So I think that caching some of the data will not speed up the process too much for you.

If you are not interested in the remote data, you could set the repository config element to an empty string to avoid license-report to connect to the server at all. Or you could wrap a script around the call to license-report that will use a configuration with a set repository path only every other day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants