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

Long initialization on first detect #13

Closed
g4s8 opened this issue Apr 28, 2021 · 0 comments · Fixed by #14
Closed

Long initialization on first detect #13

g4s8 opened this issue Apr 28, 2021 · 0 comments · Fixed by #14

Comments

@g4s8
Copy link
Contributor

g4s8 commented Apr 28, 2021

When the Detect() function called the first time, it loads license database from internal files via internal.globalLicenseDatabase(). There are no problems when calling it once from CLI. But it could be an issue when called from HTTP endpoint on a service with limited resource, since the request may be dropped due to connection timeout.

E.g. see this comment: https://gitlab.com/gitlab-org/gitaly/-/merge_requests/3313#note_561680449

I'm proposing to add a new method to load the database before Detect, e.g. from main() of web-app before starting web-service.

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

Successfully merging a pull request may close this issue.

1 participant