Skip to content

chore: Optimize garbage collection for Topology instance #33

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Apr 14, 2025

Conversation

teogeb
Copy link
Collaborator

@teogeb teogeb commented Apr 9, 2025

Extract crawl iteration run to a separate method. This way the local topology instance is cleaned up from memory immediately after the crawl.

Before this PR the topology instance was kept in memory until the start of the next iteration. This happens because the method is async, in a non-async method the topology would have been cleaned-up earlier (already when it execution exists the try-catch scope as it is a local variable there).

Other changes

Also simplified handling of subcriberGate. There is no need to pass it as an argument as it is a field of Crawler.

@teogeb teogeb requested a review from juslesan April 9, 2025 11:23
@teogeb teogeb merged commit 95d6101 into main Apr 14, 2025
3 checks passed
@teogeb teogeb deleted the optimize-topology-garbage-collection branch April 14, 2025 09:37
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants