I’m currently testing deploying liveview to improve the UI of tables in my project, however i’m running into performance issues when patching unrelated components to the page (such as the new and edit forms).
From what i’ve read about DOM patching, I don’t believe I should be having this much of a delay patching with a relatively small amount of rows on the page (250), which gets increasingly worse the more rows I have on the page.
Theoretically patching the new form component should be lightning fast as it’s not doing anything with the table itself, however the browser performance profile shows it takes almost 250ms to patch, recalculate the styles and layout the page. I’m expecting this to be far worse in production as that dataset is far more complex, though the average displayed row count i expect is around the 250 i’m testing with.
I’ve propped up a demo repository at GitHub - dabaer/liveview-table-test to demonstrate the problem with a generic dataset that seeds 250 randomish rows.
Attempting to patch the new form component with 1000 rows takes about 1-2 seconds on an 8 core Ryzen 7 processor.
Is this just how morphdom operates when patching, scanning through every single row and causing the browser to re-render everything? Or are there performance optimizations I can make on the liveview side?
To clarify as well, I am using temporary assigns with this table, and running with the bare minimum in terms of table features (removing the moveable columns, removing the column sort, removing the dynamic column and data render) does not reduce this repaint time.