Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291667

Improve tabledrag.js performance

$
0
0

Problem/Motivation

tabledrag.js falls unusable on large menus (e.g. 150+ menu items) on older browsers. (e.g. IEs / Edge, some reported Firefox also).

After a quick debugging, I found that executed a very expensive function on MouseEvent. @see below:

Proposed resolution

tabledrag.js is one of the largest JS lib in Core. It's about 1600 lines. Any huge refactoring seems impossible at the moment. It required a lot of human time to write JSTests and human testing & reviews.

After some thoughts, I decided to add a simple DEBOUNCE function to the MouseEvent. On my testing, it works much better.

Note: It still not perfect. DOM rendering is also slow on older browsers. We could do further improvement on follow-ups

(I suggested to skip JSTests on tabledrag.js of this simple patch.)

Remaining tasks

- Human Testing on different browsers
- Review patches

(Hints: Using Devel module to gen menu items)

User interface changes

- N/A

API changes

- N/A

Data model changes

- N/A


Viewing all articles
Browse latest Browse all 291667

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>