New issue
Advanced search Search tips

Issue 827787 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Nov 23
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 705916



Sign in to add a comment

slow performance with headless mode on windows

Reported by laota...@gmail.com, Mar 31 2018

Issue description

Chrome Version       :  67.0.3372.0(used by puppeteer, windows 7 x64)
URLs (if applicable) :
Other browsers tested: NUll

What steps will reproduce the problem?
(1) open "https://www.amazon.com/" with new chrome tab
(2) open devtools, disable network cache, start profiling performance
(3) with headless mode, `chrome.exe --headless --remote-debugging-port=9333 https://www.amazon.com`
(4) open "http://localhost:9333", start profiling performance same as step 2

What is the expected result?

similar performance,include network waterfall、DOMContentLoad time

What happens instead?

headless mode is slower at least 2 times than normal mode.
but normal performance on macOS
I had test many times.

Please provide any additional information below. Attach a screenshot if
possible.

 
jietu-headless.png
1.2 MB View Download
jietu.png
1.3 MB View Download
Labels: Needs-Triage-M67
Is it possible you're going through a different proxy in headless vs. non-headless mode?

Comment 3 by laota...@gmail.com, Apr 17 2018

I had used the default Chromium configuration

But,`--proxy-bypass-list=*` really solved my problem。Reference from https://github.com/Codeception/CodeceptJS/issues/561
**macOS:** 10.13.4
**Node:** 8.10.0

I am also seeing a horrendous amount of time added to my requests when running `headless: true`.
Here is a simple code example;
```
(async () => {
  const browser = await puppeteer.launch({ headless: true });
  const promises = [];
  console.time('Timer');
  for (let i = 0; i < 10; i++) {
    promises.push(renderPage(browser));
  }
  await Promise.all(promises);
  console.timeEnd('Timer');
})();

const renderPage = async (browser: puppeteer.Browser) => {
  const page = await browser.newPage();
  await page.setViewport({ width: 1920, height: 1080 });
  await page.setContent('<h1>Some really simple HTML</h1>');
  const screenshot = await page.screenshot({ fullPage: true }); // Sets buffer but isn't used in this example.
  await page.close();
};
```

Running the above code with `headless: true` results in `7747.209ms`
Running the above code with `headless: false` results in `4775.771ms`

This is a HUGE difference in performance. Obviously I am working with more complex HTML than a simple <h1> tag and the disparity between the two modes is far greater.
Cc: vamshi.kommuri@chromium.org
Labels: Proj-Headless Needs-Feedback Triaged-ET
@Reporter: From comment#3 i.e., "`--proxy-bypass-list=*` really solved my problem", we understood that the issue is no longer seen, Could you please let us know if we can close this issue.

Thanks!
Status: WontFix (was: Unconfirmed)
As there isn't any Feedback from reporter since long time, closing this issue and marking it as Won't Fix.

@Reporter: Requesting you to file/raise a new issue if this issue is observed on the latest chrome versions.

Thanks!

Sign in to add a comment