Skip to content

Increase garbage collection on ios - #1981

Merged
pascal-fischer merged 3 commits into
mainfrom
fix/increase-garbage-collection-on-ios
May 17, 2024
Merged

Increase garbage collection on ios#1981
pascal-fischer merged 3 commits into
mainfrom
fix/increase-garbage-collection-on-ios

Conversation

@pascal-fischer

Copy link
Copy Markdown
Collaborator

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
Comment thread client/internal/peer/conn.go Outdated
return nil, err
}

runtime.GC()

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Collaborator 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
@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