Home / Companies / Qovery / Blog / Post Details
Content Deep Dive

How to Fix a Freeze Between React Pages Swap - with Dom, VDom, Painting

Blog post from Qovery

Post Details
Company
Date Published
Author
Benjamin Debon
Word Count
1,203
Language
English
Hacker News Points
-
Summary

Qovery faced a significant page freeze issue when switching between the "Overview" and "Deployments" tabs in their interface, with a noticeable delay of 400 milliseconds affecting the user experience. The investigation revealed that the problem was linked to rendering a large table, which caused the browser to freeze while focusing on rendering tasks. Initial attempts to mitigate the issue by fragmenting the rendering process and using React's useEffect to load data incrementally were unsuccessful due to React's DOM painting behavior. The solution involved using a short setTimeout within useEffect, which improved the user experience by allowing the tab to render before loading the table, thus providing immediate visual feedback. This experience highlighted the complexities of performance optimization in single-page applications and the importance of sharing findings to improve user experiences. Qovery encourages feedback and collaboration, as their open-source frontend console repository is available for exploration.