This patch makes simpletest.js perform its collapsing table rows trick faster. The current implementation causes slight delays on slower machines before it opens/closes, and uses unnecessarily intensive "fadeIn" and "fadeOut" jQuery methods when hiding/showing, even though table rows aren't capable of being faded in many browsers. I think the intention of using them might have been to simply intentionally slow down the effect. This patch takes a different approach and simply toggles visibility and uses a timer to control the expansion of rows, rather than intentionally grinding CPU cycles just to cause a delay.

Chx informs me this problem is especially noticeable in Opera. And in Konqueror the table expansion doesn't work at all. This patch works in Firefox, Opera, Konqueror, IE 6/7.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Title: Speed Up Simpletest.js With neater code » Speed Up Simpletest.js

"neater code" seems a little biased. We'll just say it's less intensive. :)

Status: Needs review » Needs work

The last submitted patch failed testing.

boombatower’s picture

Hint...this needs to be created from drupal root.

bot eats patches that are relative :)

quicksketch’s picture

Status: Needs work » Needs review
FileSize
2.67 KB

Thanks boombatower. :)

boombatower’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, works fine for me as well.

webchick’s picture

Status: Reviewed & tested by the community » Needs work

Since we're taking the opportunity to clean up the code, can we add a smattering of comments to explain what's going on?

quicksketch’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
3.13 KB

Same patch with a few more comments. Webchick made a solid argument that a lack of comments in the file doesn't justify a continued absence. So while we're in here add a few lines describing what we're doing.

quicksketch’s picture

FileSize
3.13 KB

Typo in the last patch's comments.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Wow, I can actually understand what's going on in that file now. :O

Has the quicksketch + boombatower seal of approval, chx confirmed it vastly speeds things up in Opera (though I was unable to test since Opera is fubar on my machine).

Made a couple minor adjustments to the comments and committed to HEAD. Thanks. :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.