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

High memory usage #120

Closed
mxl opened this issue Mar 2, 2016 · 4 comments
Closed

High memory usage #120

mxl opened this issue Mar 2, 2016 · 4 comments

Comments

@mxl
Copy link

mxl commented Mar 2, 2016

I run gulp-favicons with these options:

gulp.src('icon.png')
.pipe(favicons({
        appName: 'My App',
        display: 'standalone',
        orientation: 'portrait',
        version: '1.0.0',
        path: 'favicons/',
        url: 'http://example.com/,
        html: 'index.html',
        replace: true,
        icons: {
            android: true,
            appleIcon: true,
            appleStartup: true,
            coast: true,
            favicons: true,
            firefox: true,
            opengraph: true,
            twitter: true,
            windows: true,
            yandex: true
        }
    }))

icon.png has 2048x2048 size.
My machine has 2GB memory and 2GB swap. Favicons generation takes 40 seconds and often fails because there is no free memory and system kills the process.

Why memory consumption is so high and what optimizations could I apply?

@haydenbleasel
Copy link

@mxl Your image should be a maximum of 1500x1500 - the size of the OpenGraph image. Anything above that is overkill. Other than that, I have no idea. Perhaps there are code optimisations to be done.

@mbardelmeijer
Copy link

Got the same issue just now. When the favicon generation starts, memory fills up really fast and process is killed by the kernel. icon.png is 1024x1024 with offline generation. Online seems to be working fine.

@haydenbleasel
Copy link

Not sure there's much I can do about it. I get around this on my remote SSD with 2GB of RAM by creating a massive swapfile. Online generation is done on the RFG servers so it's a valid workaround but you get a slightly different result. Not sure what I can do about this for now, it's just a memory-intense module.

@LeZuse
Copy link

LeZuse commented Aug 8, 2016

Looks like an issue with Jimp jimp-dev/jimp#153

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants