raven-python
raven-python copied to clipboard
`from raven import Client` takes 17MB of RAM
from raven import Client takes 17MB of RAM
Assumptions:
- swapless linux system (embedded in my case, but would also affect cloud)
- python 2.7
To reproduce:
:/tmp# python
Python 2.7.14 (default, Jun 6 2018, 06:11:27)
[GCC 6.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>> psutil.Process().memory_info().rss
7974912
>>> from raven import Client
>>> psutil.Process().memory_info().rss
25337856
>>> 25337856-7974912
17362944
The numbers may vary slightly from system to system, but you get the idea.
This comment, from raven.transport.registry, seems relevant:
# TODO(dcramer): we really should need to import all of these by default
from raven.transport.eventlet import EventletHTTPTransport
from raven.transport.exceptions import DuplicateScheme
from raven.transport.http import HTTPTransport
from raven.transport.gevent import GeventedHTTPTransport
from raven.transport.requests import RequestsHTTPTransport
from raven.transport.threaded import ThreadedHTTPTransport
from raven.transport.threaded_requests import ThreadedRequestsHTTPTransport
from raven.transport.twisted import TwistedHTTPTransport
from raven.transport.tornado import TornadoHTTPTransport
from raven.utils import urlparse
(I think dcramer probably meant "should not")
Hi @skrap, this should no longer be a problem with the new SDK which only has a single transport implemented: https://github.com/getsentry/sentry-python