[wp-trac] [WordPress Trac] #42904: Speed up unit tests by disabling password hashing

WordPress Trac noreply at wordpress.org
Sat Dec 16 13:03:16 UTC 2017


#42904: Speed up unit tests by disabling password hashing
-----------------------------------+------------------
 Reporter:  Frank Klein            |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  5.0
Component:  Build/Test Tools       |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+------------------
Changes (by johnbillion):

 * keywords:  has-patch => has-patch 2nd-opinion
 * milestone:  Awaiting Review => 5.0


Comment:

 Some background: The `PasswordHash` class used for password hashing calls
 `md5()` repeatedly to generate a portable hash. This accounts for millions
 of calls to `md5()` and by far the greatest number of calls to a single
 function when running the full test suite.

 [[Image(https://pbs.twimg.com/media/CdtV1nCXIAAqMgC.jpg)]]

 That said, the combined wall time of `md5()` is not that high, taking up
 around 3% of wall time from my testing. [attachment:42904.patch] works and
 the tests pass, but the time saving unfortunately isn't as great as I
 hoped it would be. The time saving on my local machine is around 15
 seconds reduction on a test suite run that takes 1m 40s.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42904#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list