Skip to content

Conversation

marcomorain
Copy link
Collaborator

Introduce 2 limits on the resources used.

Use an Executor with a thread pool of max size 1 for sending HTTP requests
to Sentry. This thread pool will use 0 threads at idle, and reduce the
number of threads in use down to 0 after a minute of no exceptions.

Use a fixed queue for events. A queue of up to 50 events will be queued
for sending to Sentry. If more than 50 events are queued, the new events
will be discarded.

These two changes will add a fixed ceiling to the amount of resources the
Sentry client will use on the device.

@marcomorain
Copy link
Collaborator Author

@joshdholtz this will reduce the amount of resources used by the client.

This moves processing off the async task thread pool so the Sentry client won't block the app.

@marcomorain marcomorain force-pushed the feature-use-executor branch 2 times, most recently from 9e8f92e to 4d2399a Compare September 23, 2016 21:47
Introduce 2 limits on the resources used.

Use an Executor with a thread pool of max size 1 for sending HTTP requests
to Sentry. This thread pool will use 0 threads at idle, and reduce the
number of threads in use down to 0 after a minute of no exceptions.

Use a fixed queue for events. A queue of up to 50 events will be queued
for sending to Sentry. If more than 50 events are queued, the new events
will be discarded.

These two changes will add a fixed ceiling to the amount of resources the
Sentry client will use on the device.
@marcomorain marcomorain merged commit 4869ae8 into joshdholtz:master Sep 23, 2016
@marcomorain marcomorain deleted the feature-use-executor branch September 23, 2016 21:48
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.

1 participant