primeng icon indicating copy to clipboard operation
primeng copied to clipboard

DragDrop component performance improvements

Open cyberrranger opened this issue 9 years ago • 5 comments

[X] bug report => Search github for a similar issue or PR before submitting
  1. Open http://plnkr.co/edit/czFGnPpLJ7RhIhVVb5u8?p=preview

  2. Open Console

  3. Drag a Item from Tree to the right side

  4. Show in Console -> dragStartProject -> dropProject -> dragEndProject

  5. the output dragEndProject is in the same second

  6. Now click on the Button "Expand All"

  7. Drag a Item from Tree to the right side

  8. Show in Console -> dragStartProject -> dropProject -> dragEndProject

  9. 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

cyberrranger avatar Dec 01 '17 13:12 cyberrranger

same problem

CyleClone avatar Dec 01 '17 13:12 CyleClone

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

cyberrranger avatar Dec 07 '17 11:12 cyberrranger

@cagataycivici can you help?

cyberrranger avatar Dec 12 '17 09:12 cyberrranger

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.

cagataycivici avatar Dec 24 '17 10:12 cagataycivici

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

pdhamija avatar Mar 29 '18 19:03 pdhamija