[wp-trac] [WordPress Trac] #30837: Updating "about ten percent" code or comment

WordPress Trac noreply at wordpress.org
Thu Dec 25 21:36:16 UTC 2014


#30837: Updating "about ten percent" code or comment
----------------------------+------------------------------
 Reporter:  dmchale         |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Administration  |     Version:  3.5
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+------------------------------

Comment (by azaozz):

 Yeah, the comment is not that accurate :) From the code, the intention is
 to reduce the chance for a check when the number of sites increases. It
 tries to keep (very roughly) the number of checks whitin the same range
 regardless of the number of sites. It might be a bit more readable like
 this:

 {{{
 if ( $c <= 50 || rand( 1, ceil( $c / 50 ) ) === 2 )
 }}}

 This can be a bit more "sensitive". A 5% chance for a network whit 1000
 sites (1% for 5000 sites) seems quite high compared to a single site.
 Perhaps the magic number should be 30 or even 20, not 50.

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


More information about the wp-trac mailing list