You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(diff): optimize streaming performance with chunk-based updates
Replace line-by-line diff calculation with optimized chunk-based streaming for better performance with large files. Instead of processing each line individually, content is now updated in dynamic chunks (max(50, totalLines/20)) with a 10ms delay between updates for smooth visualization.
Key improvements:
Replace individual line inserts with efficient bulk content updates
Reduce scroll jitter by only updating viewport when needed
Optimize decoration updates to align with chunk processing
Keep cursor at document start to avoid streaming interference
These changes significantly improve the performance and visual experience of the diff view, particularly when handling larger files or rapid content updates.
0 commit comments