Comments

nod_’s picture

Title: Selectors clean-up: simpletest module » Rewrite simpletest module

The way things work here is pretty crazy. Animation is bad and this is the slowest script (by far) of Drupal core.

nod_’s picture

Title: Rewrite simpletest module » Rewrite JS of simpletest module

Ok, better title :)

nod_’s picture

Title: Rewrite JS of simpletest module » Rewrite simpletest.js
nod_’s picture

tag

nod_’s picture

droplet’s picture

Status: Active » Needs work
StatusFileSize
new5.07 KB

Working on a related topic, make a quick patch but doesn't meant to cleaup all stuff.

(I'll be back if no one work on it)

nod_’s picture

mgifford’s picture

tagging.

quicksketch’s picture

Seems like a good idea to me. I like the animation but it's fine if it gets the ax. We've got a lot more tests now than we did when this was written.

+      $simpletestImage.bind('click', function () {

Considering the number of tests we have, it'd be a much better idea to bind to the entire table rather than each individual collapse arrow using the new jQuery $.on() method. This makes it so we only need one binding on the page instead of ~100.

$('#simpletest-form-table').on('click', '.simpletest-image', function() {
wim leers’s picture

#9++

This is so dog slow that it's frustrating to run tests (and the CLI test runner is broken, at least in D8). The animation may not be the best JS, but it's fine perf-wise. It's the "group checkbox" stuff that is so frustrating. Unfortunately, a quick test revealed that even if we *don't* do the group checkbox updating thing (only insert the group checkboxes upon initialization, no correlated checkbox updating thing), then it's *still* equally slow. This is in the latest Chrome. So I honestly don't see how we can fix this :/ It turns out tableselect.js is the culprit for a lot of the slowness! So this issue won't have much (or even any) effect unless we also improve that JS…

wim leers’s picture

Status: Needs work » Needs review
StatusFileSize
new1.28 KB

So … tableselect.js really is the cause of all this slowness. Apply the attached patch and be delighted. You might even put away that knife that you wanted to use to stab your eyes out. (OTOH, with this patch applied, if you want to run *all* tests, now you'll want to use the aforementioned knife to check the zillion checkboxes on your screen.)

Setting to NR to get some attention for this new-found information.

xjm’s picture

THANK YOU for this; this bug drives me absolutely crazy.

tim.plunkett’s picture

I use the simpletest UI a ton, and I've NEVER used the test group checkboxes, always individually selecting tests.
So +1

Status: Needs review » Needs work
droplet’s picture

nod_’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)

2 years without complaints, not worth it to refactor now.