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: improvements in memory consumption #100

Merged
merged 11 commits into from
Feb 11, 2024
Merged

fix: improvements in memory consumption #100

merged 11 commits into from
Feb 11, 2024

Conversation

juev
Copy link
Contributor

@juev juev commented Feb 7, 2024

I think it should help to close #80

I think it should help to close #80
- preallocate config slices
- not used interfaces in consumer
- do not allocate new variables in loops
@juev
Copy link
Contributor Author

juev commented Feb 8, 2024

Hi!

The module name has been changed, it doesn't matter, and if there are any problems, let me know, I'll return it back.

The socks5 library used has been changed to a more up-to-date one. We also made a small optimization on the use of variables in loops. As a result, much less memory is consumed and requests are processed faster.

@juev juev changed the title fix: must close the connection after processing fix: improvements in memory consumption Feb 8, 2024
@pufferffish
Copy link
Owner

Thanks for this huge PR. Really appreciate it. I'd review it when I have more bandwidth. Is this PR ready or are there more things to fix?

@juev
Copy link
Contributor Author

juev commented Feb 9, 2024

I just corrected one of the errors that caused multiple http connections to be handled incorrectly. Now I think that everything is correct and can be checked.

@pufferffish pufferffish merged commit a2d7aec into pufferffish:master Feb 11, 2024
10 checks passed
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

Successfully merging this pull request may close these issues.

High ram usage
2 participants