[Question] How to increase page lookup timing
See original GitHub issueMigrating from puppeteer
to playwright I have noticed an increase in the time to load a simple page using page.goto
. Take the example below…
// testing.test.ts
import { test, expect } from '@playwright/test';
test('Testing page.goto', async ({ page }) => {
await page.goto('https://google.com');
expect(true).toBe(true);
});

The html reporting shows it takes ~2s
for the goto
step to complete. Comparing this to puppeteer times on the order of 300ms
.
To my understanding, a new page
is created for each test
and seems like a necessary tradeoff to enable parallelism. That said I am curious if this time is typical or if there is something I can configure or even a custom fixture, to increase this speed?
My full playwright config
// playwright.config.ts
import { PlaywrightTestConfig } from '@playwright/test';
const isCI = process.env.CI === 'true';
const config: PlaywrightTestConfig = {
use: {
headless: true,
locale: 'en-us',
viewport: { width: 785, height: 600 },
trace: 'off',
screenshot: 'off', // already testing screenshots
video: 'retain-on-failure',
launchOptions: {
ignoreDefaultArgs: ['--hide-scrollbars'],
args: ['--use-gl=egl'],
},
},
reporter: [['html', { open: 'never', outputFolder: 'html_report' }], isCI ? ['line'] : ['list']],
expect: {
toMatchSnapshot: {
threshold: 0,
maxDiffPixels: 4,
},
},
forbidOnly: isCI,
timeout: 10 * 1000,
preserveOutput: 'failures-only',
snapshotDir: 'screenshots',
testDir: 'tests',
outputDir: 'test_failures',
fullyParallel: true,
projects: [
{
name: 'chrome',
use: {
browserName: 'chromium',
},
},
],
};
Issue Analytics
- State:
- Created a year ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
What Is DNS Lookup Time & How to Reduce It? - Sematext
The average DNS lookup time is between 20 and 120 milliseconds. Anything between that and under is generally considered very good. How to...
Read more >8 Tips on How to Reduce DNS Lookups and Speed Them Up
But it can improve your DNS lookup times by choosing a TTL that coincides with how often changes are made on your site....
Read more >Best Practices for Speeding Up Your Web Site
This is the most important guideline for improving performance for first time visitors. As described in Tenni Theurer's blog post Browser Cache ...
Read more >Creating support cases and case management - AWS Support
Account and billing support cases are available to all AWS customers. You can get help with billing and account questions. Service limit increase...
Read more >Schedule Appointment - Home Page
Available for purchase at our online store. Confidently and securely access your upcoming appointments, lab results, and more with a free MyQuest ®...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Not really. If you mark your suite as
serial
, tests in that suite will run in order. There is no way to reuse thepage
between tests that literally run in parallel at the same time 😄 If you manually split your tests into files/suites, and only reuse thepage
inside each suite, you’ll have full control of what can run in parallel.Closing since there doesn’t seem to be any action item here.