Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DragDrop component performance improvements #4590

Closed
cyberrranger opened this issue Dec 1, 2017 · 5 comments
Closed

DragDrop component performance improvements #4590

cyberrranger opened this issue Dec 1, 2017 · 5 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@cyberrranger
Copy link

[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

@CyleClone
Copy link

same problem

@cyberrranger
Copy link
Author

cyberrranger commented Dec 7, 2017

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
Copy link
Author

@cagataycivici can you help?

@cagataycivici cagataycivici added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working Status: Pending Review Issue or pull request is being reviewed by Core Team labels Dec 19, 2017
@cagataycivici cagataycivici added this to the 5.1.0-M1 milestone Dec 19, 2017
@cagataycivici
Copy link
Member

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 cagataycivici changed the title Expanded TreeTable with Drag & Drop Performance Problems DragDrop component performance improvements Dec 25, 2017
@cagataycivici cagataycivici self-assigned this Dec 25, 2017
@cagataycivici cagataycivici added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Type: Bug Issue contains a bug related to a specific component. Something about the component is not working Status: Pending Review Issue or pull request is being reviewed by Core Team labels Dec 25, 2017
@pdhamija
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

4 participants