git-diff-view icon indicating copy to clipboard operation
git-diff-view copied to clipboard

Support Virtual Scroll to improve performance

Open andyyxw opened this issue 11 months ago • 2 comments

When rendering tens of thousands of lines of diff content, it will be very stuck and often out of memory

andyyxw avatar Dec 18 '24 07:12 andyyxw

There are a example for use @git-diff-view/react with react-virtuoso to implement Github like Virtual Scroll, you can check the code on https://github.com/MrWangJustToDo/MrWangJustToDo.io/blob/main/app/src/components/DiffView/DiffContent.tsx#L118

MrWangJustToDo avatar Feb 13 '25 08:02 MrWangJustToDo

There are a example for use @git-diff-view/react with react-virtuoso to implement Github like Virtual Scroll, you can check the code on https://github.com/MrWangJustToDo/MrWangJustToDo.io/blob/main/app/src/components/DiffView/DiffContent.tsx#L118

Image This demo does not seem to solve the performance problem of git-diff-view, but just uses list rendering of multiple git-diff-view boxes.

andyyxw avatar Feb 24 '25 07:02 andyyxw