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

Fix slow speed of user agent generation #42

Merged
merged 1 commit into from
May 22, 2023

Conversation

neon-mmd
Copy link
Owner

@neon-mmd neon-mmd commented May 22, 2023

What does this PR do?

This PR reduces the time it takes to build user agents by enabling caching and using once_cell crate.

image

Why is this change important?

This change improves the speed of the server by reducing unnecessary delay to build and fetch random user agents.

Author's checklist

  • wrap the built user agent value into a once_cell static variable

Related issues

Closes #25

Re-opening PR #34

@xffxff xffxff merged commit 4079255 into rolling May 22, 2023
@neon-mmd
Copy link
Owner Author

Ok great 😄 , thanks for taking the time to review 👍 🙂 .

@neon-mmd neon-mmd deleted the fix-slow-speed-of-user-agent-generation branch May 22, 2023 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants