Open DBosley opened 8 years ago
You mean some kind of throttling/debouncing of the function itself? Maybe something like https://remysharp.com/2010/07/21/throttling-function-calls could be used so we wouldn't need to build it into knockout-dragdrop?
I was able to use underscore.js's _.throttle
method to get the performance increased. This had some side effects (like if you let go before it would let the 'dragOver' event function execute) but they were pretty simple to resolve. It all works fantastically now, but built in throttling might be a good idea to keep in mind for feature enhancements. Especially if you could guarantee the first execution of the function call.
If a function is called on the 'dragOver' event, depending on the function's complexity, it can make slower computers very laggy while dragging.
If there was a way to reduce the speed at which this executes, that would help a lot for performance.