简体   繁体   English

web 性能的哪个指标对 SPA 平台更有效?

[英]Which metric of web performance is more effective for SPA - platform?

I have a plan about measuring our platform(SPA)'s performance and tracking a metric result everyday.我有一个计划来衡量我们平台(SPA)的性能并每天跟踪一个指标结果。

There are two metric that I can measure.我可以衡量两个指标。

  • domcontentloaded domcontentloaded
  • load加载

在此处输入图像描述

Which one is more effective for SPA platform?哪一个对SPA平台更有效?

// notes (I already knew there are many metric(FP, LCP, ....) but in this time, I just want to take only one metric in domcontentloaded or load.) // 注释(我已经知道有很多 metric(FP, LCP, ....) 但这次我只想在 domcontentloaded 或 load 中取一个 metric。)

TL;DR: choose a modern metric. TL;DR:选择一个现代指标。 DCL and load are ineffective measurements for page load performance. DCL 和负载对于页面加载性能来说是无效的测量。

Both DOM Content Loaded and the plain load event are generally seen an outmoded, poor signals for page load performance. DOM Content Loaded 和普通加载事件通常都被视为页面加载性能过时的不良信号。 There are some technical differences between the two (DCL happens as the browser is finishing up parsing the DOM ( basically the last step ), and load happens once that parsing is complete).两者之间存在一些技术差异(DCL 在浏览器完成解析 DOM 时发生(基本上是最后一步),并且在解析完成后发生加载)。

Using a more modern standard will provide much better signal WRT how your page is loading.使用更现代的标准将提供更好的信号 WRT 您的页面加载方式。 You mention Largest Contentful Paint, which is possibly a good one to choose, given that LCP tends to correlate with when people see a site as being "ready."您提到了最大内容绘制,这可能是一个不错的选择,因为 LCP 往往与人们认为网站“准备就绪”的时间相关。 Total Blocking Time may also be helpful for a SPA, as that measures the amount of time between FCP and TTI where the site was unable to handle user input.总阻塞时间也可能对 SPA 有所帮助,因为它衡量了 FCP 和 TTI 之间站点无法处理用户输入的时间量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM