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

Memoizing the results from giphy causes a lot of memory consumption #4

Closed
codingmatty opened this issue Dec 20, 2017 · 2 comments
Closed

Comments

@codingmatty
Copy link
Contributor

I know that electron apps use a lot of memory to begin with, but I notice that Cerebro helpers use a lot, and I think this plugin may be the culprit. (I use it a lot).

I have been looking into the memoizee library, and notice that there is no default limit on size, nor a default limit on how long to hold things. There is also no way to store the results to disk instead of keeping them in memory. I believe all of this causes Cerebro's memory footprint to grow the more this plugin is used.

Short term, I'd suggest adding some size limits, and time limits.
Long term, I'd suggest looking into different memoize libraries to use that would allow developers to save results to disk instead of holding them in memory.

@KELiON
Copy link
Collaborator

KELiON commented Dec 21, 2017

@codingmatty I'd say that storing results on disk is not memoization, so we should split these two terms – memoization and caching. In this plugins we only memoize but I agree that we should add some TTL to memoized results.

@KELiON
Copy link
Collaborator

KELiON commented Dec 21, 2017

@codingmatty can you add this in PR? You just need to add options object to memoize call with maxAge key (like in google plugin)

codingmatty pushed a commit to codingmatty/cerebro-gif that referenced this issue Jan 8, 2018
@KELiON KELiON closed this as completed in #5 Jan 17, 2018
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

2 participants