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

Sourcery eating up 12GB of memory... #230

Closed
Eagleames opened this issue Apr 20, 2022 · 6 comments
Closed

Sourcery eating up 12GB of memory... #230

Eagleames opened this issue Apr 20, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@Eagleames
Copy link

Issue description or question

image

Not sure what happened, only went away when I closed all of my VScode windows...
Clearly got run away eating up tons of memory!!

Sourcery Version

v0.11.2

Code editor or IDE name and version

VSCODE 1.66.2

OS name and version

Windows 10 21H2

@reka reka added the bug Something isn't working label Apr 21, 2022
@reka
Copy link
Contributor

reka commented Apr 21, 2022

Hi @Eagleames ,
Thanks a lot for reporting this bug.
We're working on a fix for it.

Do you perhaps have some ideas under which circumstances this occurs?
E.g. does it happen for all of your projects or only for some of them?
Do you have some large files open when Sourcery's memory consumption increases so much?

We'll let you know when we have a fix for this.

Cheers,
Reka

@Eagleames
Copy link
Author

Howdy!
So, i don't really know what happened.
I can say that at the start of realizing it, i had maybe 6 different projects open.

But then I just told VSCode to close everything and all windows but two closed.

The weirdest thing is that it maintained high memory through the closing of one more window, and then with only a tiny project where i was just learning to use mechanicalsoup it didn't go away.
When I closed that instance then sourcery closed itself.

Frankly i don't think that was the cause (but rather that other larger projects somehow got it in a loop or something...

But no way to know.
Only saw it once, but if i catch it again I will repost.

@WXZhao7
Copy link

WXZhao7 commented May 6, 2022

It used 6.6Gb memory when I test some simple and short python scripts :(

> ps -eo size,pid,user,command | grep -i 'sourcery' | grep -v 'grep' | awk '{ hr=$1/1024 ; printf("%.2fMB\t%s",hr,$4)}'
7017.96MB	/home/wxz/.vscode/extensions/sourcery.sourcery-0.11.4/sourcery_binaries/install/linux/sourcery

@bm424
Copy link
Contributor

bm424 commented Jun 13, 2022

Hey @Eagleames and @WXZhao7 - thanks for providing some context on this. We made a couple of tweaks in Sourcery 0.11.5 (released 2022-05-18) to reduce the memory footprint. I was wondering if you've noticed any improvement?

@WXZhao7
Copy link

WXZhao7 commented Jun 13, 2022

@bm424 Yeah, it only cost around 500mb now. Thanks for your support :)

@bm424
Copy link
Contributor

bm424 commented Jun 15, 2022

That's great, glad to hear it's working better for you. I'm going to close this issue for now, but feel free to get in touch again.

@bm424 bm424 closed this as completed Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants