Skip to content

High ~1s latency for every single playwright-cli commands. How to decrease? #387

@KkEeVvIiNnn

Description

@KkEeVvIiNnn

Description

Simple commands in playwright-cli consistently take ~1s to complete, even when the actual operation is trivial.

For example, a basic click command:

$ playwright-cli open "example.com"

$ time playwright-cli click e3

Output:

playwright-cli click e3  0.05s user 0.03s system 6% cpu 1.141 total

And even a minimal run-code:

$ time playwright-cli run-code "async page => { return 1; }" --raw

Output:

1
playwright-cli run-code ...  0.05s user 0.03s system 6% cpu 1.121 total

In both cases, total execution time is consistently over 1 second.

Comparison

Interestingly, snapshot / screenshot is significantly faster:

$ time playwright-cli snapshot

Output:

playwright-cli snapshot  0.05s user 0.02s system 72% cpu 0.095 total

Question

Is there a way to reduce the cost?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions