I encountered a major frontend performance issue when using many TextEditorField instances on the same EasyAdmin page, especially inside CollectionField.
Problem :
Each TextEditorField immediately instantiates a full Trix editor on page load:
hidden textarea
trix-editor
toolbar
event listeners
undo/redo history
rich DOM/contenteditable handling
With many editors on the page (20+), the browser becomes very heavy when the user starts typing.
Symptoms :
The issue is entirely frontend-side:
typing latency starts immediately after page load
the more editors and content there are, the worse it becomes
The biggest performance hit seems related to:
multiple active contenteditable areas
Trix undo/redo history management
many simultaneously mounted editors
What significantly improved performance :
I implemented a lazy-loading approach for TextEditorField:
page load → render lightweight HTML preview only
focus/click → dynamically create trix-editor
blur → save content and completely destroy the editor + toolbar
So instead of :
20-30 active Trix instances
There is only :
1 active Trix instance at a time
This dramatically improved typing responsiveness.
I also disabled undo/redo history handling for the lazy editors, which further improved performance.
Possible improvement for EasyAdmin :
A LazyTextEditorField class (or option mode) for TextEditorField could probably solve this class of performance problems.
This would especially help pages using :
large forms
collections
multiple rich text editors
long HTML content
I encountered a major frontend performance issue when using many TextEditorField instances on the same EasyAdmin page, especially inside CollectionField.
Problem :
Each TextEditorField immediately instantiates a full Trix editor on page load:
With many editors on the page (20+), the browser becomes very heavy when the user starts typing.
Symptoms :
The issue is entirely frontend-side:
The biggest performance hit seems related to:
What significantly improved performance :
I implemented a lazy-loading approach for TextEditorField:
So instead of :
20-30 active Trix instances
There is only :
1 active Trix instance at a time
This dramatically improved typing responsiveness.
I also disabled undo/redo history handling for the lazy editors, which further improved performance.
Possible improvement for EasyAdmin :
A LazyTextEditorField class (or option mode) for TextEditorField could probably solve this class of performance problems.
This would especially help pages using :