DragDrop component performance improvements
[X] bug report => Search github for a similar issue or PR before submitting
-
Open http://plnkr.co/edit/czFGnPpLJ7RhIhVVb5u8?p=preview
-
Open Console
-
Drag a Item from Tree to the right side
-
Show in Console -> dragStartProject -> dropProject -> dragEndProject
-
the output dragEndProject is in the same second
-
Now click on the Button "Expand All"
-
Drag a Item from Tree to the right side
-
Show in Console -> dragStartProject -> dropProject -> dragEndProject
-
the output dragEndProject is NOT in the same second, you can wait 10 - 20 sec
What is the motivation / use case for changing the behavior? see top, i cant wait 10 - 20 sec
Please tell us about your environment:
-
Angular version: 4 & 5
-
PrimeNG version: 4 & 5
-
Browser: [all]
(same Problem on DataTable - Row Grouping)
Kind Regards
Patrick
same problem
UPDATE if i change https://github.com/primefaces/primeng/blob/master/src/app/components/dragdrop/dragdrop.ts
@HostListener('dragover', ['$event'])
dragOver(event) {
event.preventDefault();
// this.onDragOver.emit(event);
}
i win Performance
/* @HostListener('drag', ['$event'])
drag(event) {
this.onDrag.emit(event);
} */
i win more Performance
@cagataycivici can you help?
I think we should use NgZone runOutsideAngular to avoid triggering change detection. That is what we did in the past to solve cases like these.
Can someone confirmed if this has improve tree drag drop experience? If yes, what did it involve - simply use the version 5.1.0-M1and up OR any extra code change as well? Please suggest