JeffersonLab / calendar

Accelerator task list calendar
https://ace.jlab.org/calendar
MIT License
0 stars 0 forks source link

Drag and drop slow #2

Closed slominskir closed 1 year ago

slominskir commented 1 year ago

The drag and drop feature, especially with adding/removing spaces is now slower than before since moving the app to ace.jlab.org and upgrading to latest jQuery UI.

The jQuery UI lib is used for drag and drop and the version went from 1.10.3 to 1.13.2 and jQuery went from version 1.10.2 to 3.6.1. Changes to the lib API resulted in the following changes to calendar: https://github.com/JeffersonLab/calendar/commit/9fc7b4cbf2f8d5e68f77f46d1fe5740339360320

Note: It appears switching from outlook or month view to week view minimizes the number of occurrences and speeds up drag and drop.

slominskir commented 1 year ago

When SAD Calendar was first created back in 2011 (released early 2012) jQuery UI was a good choice for drag and drop. Today more than a decade later there are probably better choices, especially ones that leverage the browser built-in drag and drop API such as:

Alternatively, we could roll back to older versions of jQuery and jQuery UI since those were working fine. I noticed most modern Drag and Drop libs aren't really maintained either. No one wants to maintain stuff I guess.

The slow jQuery UI lib is apparently a known issue:

slominskir commented 1 year ago

Just going to roll back to old versions. Why fix what isn't broke? Plus I don't want to spend a month evaluating current state of drag and drop libraries, commit to one, then re-implement giant chunk of calendar code. Fixed in v3.14.1