⚡ perf: optimize CodeViewer performance for large content rendering
- Add intelligent content truncation for payloads over 50K characters - Implement tiered performance handling based on content size - Use useMemo and useCallback for memory optimization and caching - Add progressive loading with async processing for very large content - Introduce performance warning indicators and user feedback - Create expand/collapse functionality with smooth animations - Skip syntax highlighting for extremely large content (>100K) - Add loading states and debounce handling for better UX - Display remaining content size indicators (e.g., +15K) - Implement chunk-based processing to prevent UI blocking This optimization ensures that even multi-megabyte JSON responses won't cause page freezing or performance degradation in the debug panel, while maintaining full functionality for regular-sized content.
Showing
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment