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

Size of local chromium #3027

Closed
prakashpsde opened this issue Aug 6, 2018 · 5 comments
Closed

Size of local chromium #3027

prakashpsde opened this issue Aug 6, 2018 · 5 comments

Comments

@prakashpsde
Copy link

npm i puppeteer

Installing puppeteer installs a local-chromium which is of size 292MB.
Generating PDF with HTML is the only feature that I'm using with puppeteer for now.
Is there a way to lower the size of npm?

  • Puppeteer version: 1.6.2
  • Platform / OS version: Windows 8.1 - 62-bit
  • URLs (if applicable):
  • Node.js version: 9.5.0
@tsullivan
Copy link

It looks like puppeteer downloads snapshots from https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html

Looking at revision 579032, some download sizes are:

  • Mac / chrome-mac.zip: 84.74 MB
  • Linux_x64 / chrome-linux.zip: 107.28 MB
  • Win_x64 chrome-win32.zip / : 133.89 MB

Maybe 292MB is the unzipped size?

I agree these are very large downloads. Are these builds really optimized for their purpose, or are they statically linked with dependencies unrelated to headless functionality?

Is there a guide to making our own builds of chromium headless for all platforms?

@aslushnikov
Copy link
Contributor

Is there a way to lower the size of npm?

@prakashpsde you can use PUPPETEER_SKIP_CHROMIUM_DOWNLOAD env variable to skip download and then use your own build. Since you only need PDF generation, you can build headless_shell - it should be way slimmer. You can read about building various chromium targets on
chromium.org.

Are these builds really optimized for their purpose, or are they statically linked with dependencies unrelated to headless functionality?

@tsullivan These are builds that we get from Chromium's CI - they are general-purpose chromium builds.

@chrisdavies
Copy link

@aslushnikov Do you know where I could find the source for the chromium_revision specified in package.json? I couldn't find any related git commits, only some references in comments such as this one: chromium/chromium@dcf17fe

Searching the comments doesn't seem like a very practical way for me to find this, though.

@chrisdavies
Copy link

Just following up. You find it here:

https://crrev.com/{rev_number}

@prithvi2k2
Copy link

Does puppeteer-core fix all the problems mentioned above, FYI I'm ok with headless for my utility. So, Should I prefer puppeteer-core over puppeteer?

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

5 participants