Skip to content

bug: "profile" option makes loading very slow on Chrome 109 #3978

@aslushnikov

Description

@aslushnikov

Prerequisites

Stencil Version

2.21.0

Current Behavior

WebSite loading is slow if it's built with "profile: true" and Chrome M109+ is used.

Expected Behavior

Everything is fast!

System Info

No response

Steps to Reproduce

See https://bugs.chromium.org/p/chromium/issues/detail?id=1406736

Code Reproduction URL

https://github.com/aslushnikov/stencil-js-regression-chrome-109

Additional Information

Hi folks!

Recent change in chromium regressed the performance.getEntriesByName() API performance, which StencilJS uses here:

https://github.com/ionic-team/stencil/blob/80ef14361613706d38ad6799a03d3e5f1e1e6cbe/src/runtime/profile.ts#L24-L39

This regression has been filed & is under investigation by Chromium team, see https://bugs.chromium.org/p/chromium/issues/detail?id=1406736

I'm filing this issue to let you know that, according to the discussion in the chromium bug, StencilJS can do proactive steps to mitigate the regression by a slightly different API usage, see: https://bugs.chromium.org/p/chromium/issues/detail?id=1406736#c8

P.S. I myself came here as part of the investigation of microsoft/playwright#19946

Metadata

Metadata

Labels

Bug: ValidatedThis PR or Issue is verified to be a bug within Stencil

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions