RTL Performance Impact
See original GitHub issueGreetings!
I’ve been investigating React Testing Library performance issues on a test suite in my organization. After digging I finally traced the issue to <FocusLock>. We are wrapping our modal with this and when I remove <FocusLock> from our modal component, it nearly cuts my testing time in half from 110s (83 tests total) to 50s!
I haven’t had the time to dive into this repo so unfortunately I don’t know where to begin to fix it, so I thought I’d open an issue.
What information can I give that will help? Is this a known performance issue?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Measuring Performance with RTL or HLS Monitors - Xilinx
You can use custom RTL or HLS kernels to count the cycles elapsed between the start and end of AXI4-Stream transactions. In the...
Read more >Physical Lint: Physical Quality Metrics For Your RTL
The quality of the logic structures generated from RTL has a direct impact on the number of design iterations required to close a...
Read more >How to Measure & Optimize System Performance of a ...
Once performance characterization has been satisfactorily completed the second step of the process is to build more realistic use-cases that ...
Read more >Improving Design Power and Performance with RTL Architect
Exploring the impact of RTL on implementation PPA has traditionally been very difficult since it was hard to connect the results to the...
Read more >RTL Validation Methodology | Download Scientific Diagram
... this work we target two platforms for validating the performance model: cycle-accurate RTL model simulation and simulation on a hardware emulator. Figure...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The new version, 2.5.1, has been released with the potential fix for this issue (#151)
You can or update focus-lock, or update underlying
focus-lock(just wipe it from yarn.lock or package.lock) which brought the fix - https://github.com/theKashey/focus-lock/pull/24In our case, we’ve started seeing a test-performance regression after upgrading our
create-react-appapplication to v4. The impact on the entire test suite was quite dramatic, something on the order of 4 to 5 times slower. We’re using React Testing Library as well. Judging from the profiler, most of that time is spent inreact-focus-lock’sactivateTrap()function: 15 seconds on our slowest test! That test is probably rendering a bit too much for its own good, but nothing crazy (some tables and a form in a dialog on top).We’re consuming
react-focus-lockvia@reach/dialog, so we worked around the issue by disabling it in test environments like this:CRA v4 came with
jestandjsdomupdates. Maybe something about those new versions doesn’t play well withreact-focus-lock?