react-dnd / react-dnd-html5-backend

HTML5 backend for React DnD [Legacy Repo]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dragging really slow because of HitTest. Disable hit testing on drag?

Cristy94 opened this issue · comments

I have a complex element that is being dragged over a list of multiple other similar elements and only a single drop target. Sometimes dragging works fine, but sometimes it is very, very slow (like 1 frame per second).

Looking at the browser's performance tab I see that 50% of time is used doing HitTest when moving the dragged element around (which apparently is in the Rendering category even though it doesn't trigger paint flashing).

I think the issue that should be solved is the HitTest performance being so bad, but in my case I would only need to enable the HitTest on drop, not on move.

Can hit testing be disabled while dragging?

PS: I just assumed that HitTest is the HTML5 native drag-and-drop hit testing functionality, but I might be wrong.

I have the same problem