question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Measuring performance details

See original GitHub issue

Time-slicing (fiber-based render-scheduling) will likely be introduced in React in the near future.

I have been helping out with a React-alternative myself for a couple of weeks now, which will also feature non-blocking render-scheduling, and I believe we are likely to see more libraries like this in the future.

How do we benchmark the performance of these libraries?

Merely measuring time taken seems like it’s going to favor frameworks without this feature - which seems unfair, given that this is a feature designed to improve perceived performance, e.g. by unblocking the UI thread for long enough to keep CSS animations running smoothly while rendering many slow components.

Two ideas:

  1. Measure actual CPU usage while running the tests - most conventional frameworks will be at 100% on the CPU core running the JS main thread, while frameworks that implement time-slicing should be giving some time back. (This can’t be measured from JS, so it may be difficult to implement in practice. Presenting this data in a meaningful way may also be challenging.)

  2. Measure maximum blocking durations - most conventional frameworks, for example, will block for the entire duration of rendering a large table, while frameworks that implement time-slicing will block only for as long as the slowest component instance takes to render. (This should be measurable using plain JS, e.g. by scheduling measurements with performance.now from a setInterval callback or something similar.)

Thoughts?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
krausestcommented, Dec 13, 2020

I’m closing older issues that won’t get fixed.

1reaction
yisarcommented, Nov 27, 2019

@mindplay-dk @ryansolid @localvoid Here is a new proposal that mentions some new performance testing. Such as total-blocking-time, which is useful for react or fre. We can’t just rely on testing the total rendering time to judge the performance. The total blocking time is a good way.

https://wicg.github.io/largest-contentful-paint

Read more comments on GitHub >

github_iconTop Results From Across the Web

Performance Measures | Data Collection Methods and Logic ...
A data collection, tracking, and reporting system is required to report performance measure data. Performance measures reflect system, ...
Read more >
PERFORMANCE MEASUREMENT: Definitions
Performance measurement is generally defined as regular measurement of outcomes and results, which generates reliable data on the effectiveness and efficiency ...
Read more >
Maximize Your Data With Performance Measurement ...
Performance measurement frameworks are meant to evolve, and they require periodic assessment to ensure that the data collected is meaningful and ...
Read more >
The Five Traps of Performance Measurement
The Five Traps of Performance Measurement · Trap 1: Measuring Against Yourself · Trap 2: Looking Backward · Trap 3: Putting Your Faith...
Read more >
Measuring performance - Learn web development | MDN
Measuring performance provides an important metric to help you asses the success of your app, site, or web service.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found