Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

&-selector cause memory leak #2211

Closed
Niklan opened this issue Oct 19, 2016 · 2 comments
Closed

&-selector cause memory leak #2211

Niklan opened this issue Oct 19, 2016 · 2 comments

Comments

@Niklan
Copy link

Niklan commented Oct 19, 2016

Hi.

I possible found a bug. On big projects when you use selector like &--class-name {} memory leak happens. I can't reproduce it on little projects but I tested it on several latest projects, this problem works on each of them.

It is enough to add in any file selector like that

.test {
  &-test {}
}

This selector is correct, according to SASS_REFERENCE

$ npm -v
2.15.9

$ node -v
v4.6.0

$ node -p process.versions
{ http_parser: '2.7.0',
  node: '4.6.0',
  v8: '4.5.103.37',
  uv: '1.9.1',
  zlib: '1.2.8',
  ares: '1.10.1-DEV',
  icu: '56.1',
  modules: '46',
  openssl: '1.0.2j' }

$ node -p process.platform
linux

$ node -p process.arch
x64

$ npm ls node-sass
└─┬ gulp-sass@2.3.2
  └── node-sass@3.10.1 

I don't know if I correct choose repository to report, but I think this is compilation issue.

I attached my project sass folder to show you problem.
memory-leak.tar.gz

It's clean for now of any problems. When file recompile, it uses only around 40mb of ram, but if you add, f.e. in styles/scss/styles.scss at the end

.test {
  &-test {}
}

it will start consume around 120mb, and then after every (!) recompile it uses additional 60m of ram. So this will increase ram consuption before computer is out of memory. Each "test" construction added another ~60m of ram per compile.

P.s. Sorry for my english, hopes you understand me :)

@Niklan Niklan changed the title &--selector cause memory leak &-selector cause memory leak Oct 19, 2016
@Niklan
Copy link
Author

Niklan commented Oct 19, 2016

Screenshot examples

image
image
image

@mgreter
Copy link
Contributor

mgreter commented Oct 19, 2016

Thanks for your report. I can confirm that the problems exists.
Fix is quite simple as I missed to upgrade some "new" allocations.

@mgreter mgreter closed this as completed Oct 19, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants