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

memory use is unreasonable #3

Open
eastein opened this issue Mar 12, 2015 · 2 comments
Open

memory use is unreasonable #3

eastein opened this issue Mar 12, 2015 · 2 comments

Comments

@eastein
Copy link
Owner

eastein commented Mar 12, 2015

The amount of data present in the markov chain is 2.6 MB as of now in a running instance - in the disk stored mode. The bot is using 164MB of RAM. This needs to be addressed. I could potentially try a few approaches:

Already did (helped a fairly large amount:)

  1. use slots to somewhat reduce the in memory use

Additional steps:

  1. Use BTree from zope to store the indexes rather than using dict... https://pypi.python.org/pypi/BTrees
  2. analyze what exactly is using up the RAM and try to reduce it while remaining pure python
  3. Rewrite the markov chain logic in c
@eastein
Copy link
Owner Author

eastein commented Mar 12, 2015

Maybe http://pypy.org/ will help.

@eastein
Copy link
Owner Author

eastein commented May 30, 2015

Using cffi might improve things as well. http://morepypy.blogspot.com/2015/05/cffi-10-beta-1.html

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

No branches or pull requests

1 participant