Zizzamia / perfume.js

Web performance library for measuring all performance vitals metrics
https://zizzamia.github.io/perfume/
MIT License
3.13k stars 112 forks source link

Is it supported in Safari? #178

Closed alexander-rymasheusky closed 1 year ago

alexander-rymasheusky commented 3 years ago

The readme claims "Cross browser tested", but I'm wondering what that means exactly.

On Safari 14.0 on Macos 10.15, the paint-related callbacks (in particular fcp, lcp) never trigger. Is it expected?

From some digging, I see that it uses PerformanceObserver to get these events, and PerformanceObserver.supportedEntryTypes is ["mark", "measure", "resource"] but no "paint", so it seems that it doesn't have a chance to obtain FCP and LCP.

Should the readme be clarified with a browser support section so users can know what to expect?

Zizzamia commented 2 years ago

Ciao @alexander-rymasheusky, it means for the last five years, we've used this library in production across dozens of projects and all major browsers, and there are no issues that the library could create in your app. And in the rare cases that we discovered, we quickly patched them and released a new version.

About Safari, as you noticed, PerformanceObserver is very behind.

For the readme, on purpose, we don't say the word supported but instead tested, as again that word means we do test that the library will gently stop working if the browser has an issue.

We could add a section about "hey, be careful Safari is the worst, LOL", happy to hear your thoughts on what sentence and in which part of the README we should add that.

Zizzamia commented 1 year ago

Closing this issue as has been more than year from last conversation.