Changeset 11265


Ignore:
Timestamp:
Sep 25, 2010, 12:38:49 AM (10 years ago)
Author:
Longinus00
Message:

(libt) remove jump discontinuities in getMaxAtomCount

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-mgr.c

    r11264 r11265  
    32773277getMaxAtomCount( const tr_torrent * tor )
    32783278{
    3279     /* FIXME: this curve should be smoother... */
    32803279    const int n = tor->maxConnectedPeers;
    3281     if( n >= 200 ) return n * 1.5;
    3282     if( n >= 100 ) return n * 2;
    3283     if( n >=  50 ) return n * 3;
    3284     if( n >=  20 ) return n * 5;
    3285     return n * 10;
     3280    /* approximate fit of the old jump discontinuous function */
     3281    if( n >= 55 ) return     n + 150;
     3282    if( n >= 20 ) return 2 * n + 95;
     3283    return               4 * n + 55;
    32863284}
    32873285
Note: See TracChangeset for help on using the changeset viewer.