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

Increase garbage collection on ios #1981

Merged
merged 3 commits into from
May 17, 2024

Conversation

pascal-fischer
Copy link
Contributor

Describe your changes

The iOS app only allows to connect to a limited number of peers before it reaches its memory limits (currently 50MB for the network extension). This PR is the first step in optimizing the memory usage for iOS by increasing the garbage collection.

Issue ticket number and link

#1899 (comment)

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

@pascal-fischer pascal-fischer marked this pull request as ready for review May 15, 2024 08:10
@@ -487,6 +487,8 @@ func (conn *Conn) configureConnection(remoteConn net.Conn, remoteWgPort int, rem
return nil, err
}

runtime.GC()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary for all operation systems?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary but having it running after each established connection might be good for memory in other OS as well

pappz
pappz previously approved these changes May 15, 2024
@pascal-fischer pascal-fischer merged commit 50201d6 into main May 17, 2024
21 checks passed
@pascal-fischer pascal-fischer deleted the fix/increase-garbage-collection-on-ios branch May 17, 2024 13:58
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.

3 participants