-
Notifications
You must be signed in to change notification settings - Fork 123
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
Drag and Drop Taking More time for large set of data #86
Comments
@rrohitesh any chance you can reproduce this in Plunkr? |
This is also an issue i have hit with it, i have done some investigation and found the source of the issue in my case, probably the same issue for rrohitesh. Because angular uses zone.js for its change detection it will re run a full change detection cycle when any dom event fires, this becomes a problem with large amounts of draggables, in my case it was with a list of 200 draggables that use angular templates. I have updated my fork with a fix for the issue which consists of running the repeat firing dom events(drag, dragover, dragenter, dragleave) in the parent zone so they do not trigger a change detection run. The only caveat to this is that if you do something with the onDrag, onDragOver, onDragEnter or onDragLeave event emitters that needs to cause a change detection run then with my change you would need to run something in the angular zone to trigger it. That can be done like this;
I can issue a pull request if you think the change is worthwhile? |
This Plunkr should show the issue; If you start performance monitoring in Chrome and then drag and drop an item you can see the call stack running the change detection cycle constantly. |
I have created a pull request with my fix for this issue #94 |
Thanks, @Sypher1987, I'll take a look. |
Thanks for the fix @Sypher1987 . Much appreciated. |
Hello Obaid,
I am using this library from past 6 month and till now it's very good. But, as my application is growing with huge data sets then drag and drop is taking too much time. Lets say i have 2000 item in a list to drag any item from list and drop it to some area its taking 20-30 seconds, can you suggest what to do in this case?
The text was updated successfully, but these errors were encountered: