Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Launch new tab instead of launch new browser #34

Open
vincent178 opened this issue Jun 11, 2018 · 1 comment
Open

Launch new tab instead of launch new browser #34

vincent178 opened this issue Jun 11, 2018 · 1 comment

Comments

@vincent178
Copy link

Hi,

Thanks for the nice repo, it is very helpful. Just one issue:

app.all('*', async (request, response, next) => {
  response.locals.browser = await puppeteer.launch({
    dumpio: true,
    // headless: false,
    // executablePath: 'google-chrome',
    args: ['--no-sandbox', '--disable-setuid-sandbox'], // , '--disable-dev-shm-usage']
  });

  next(); // pass control on to routes.
});

This code shows that we create a new browser every time for a new request, this requires more memory and more load time than create a new tab for the same browser.

I wonder what's the thought behind this?

Thanks,
Vincent

@vincent178 vincent178 changed the title Launch new chrome tab instead of launch new chrome app Launch new tab instead of launch new browser Jun 11, 2018
@ebidel
Copy link
Contributor

ebidel commented Jun 11, 2018 via email

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

No branches or pull requests

2 participants