Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Apr 10, 2010
  1. Support Memory mapped IO.

    authored
  2. More enforced evaluation.

    authored
Commits on Apr 9, 2010
  1. Push down readBlock to the sender Queue.

    authored
    This severely limits the amount of live ByteStrings in the client when
    running. It brings the live heap further down, even when accounting for
    foreign objects such as byte strings.
  2. Be a little more defensive.

    authored
  3. Fix supervisors by ignoring messages leaking into us

    authored
    from the parent Channel.
  4. Kill some warnings.

    authored
  5. Merge branch 'pm-arr-optim'

    authored
    Conflicts:
    	src/Process/Peer.hs
    	src/Process/Peer/Receiver.hs
  6. Merge branch 'size-optimize'

    authored
    Conflicts:
    	src/Process/Peer.hs
  7. Merge branch 'cache-rpc-return'

    authored
  8. Merge branch 'nobuffering'

    authored
Commits on Apr 8, 2010
  1. More strictness.

    authored
Commits on Apr 7, 2010
  1. foreverP --> forever.

    authored
  2. Represent Digests as ByteStrings

    authored
    There are two positive outcomes: ByteStrings are faster for most
    manipulation. Furthermore, we have 20-element Strings. These are 16
    bytes, so that means 20*16 = 320 bytes per piece. Suppose we have 4096
    pieces. Then that is 1310720 bytes, i.e., 1280 Kilobytes. With the
    change, it is a mere 80K.
    
    It is a substantial change with many torrents loaded of large size.
  3. Make PieceInfo strict.

    authored
    This is perhaps not needed, but I think we should minimize the space
    usage.
  4. Use Arrays for PieceMaps rather than Data.Map.

    authored
    Since we don't dynamically update the PieceMap when it has been built,
    there is little reason to keep it in a map and do rather expensive
    lookups in the map that may fail. Furthermore, we don't have to keep
    Data.Map Tree nodes around anymore, which should improve memory usage
    quite a bit.
  5. Re-enable SCC and spray a bit.

    authored
  6. Bump TODO.

    authored
Commits on Apr 6, 2010
  1. Optimize.

    authored
  2. Cache return TMVars rather than spawning new.

    authored
    Caching them means fewer TMVars while running.
  3. Don't recalculate the size of the pieceset in peers.

    authored
    Rather than recalculate the size of the pieceset whenever a peer sends
    us a have message (potentially some 8000 bitshift operations and a lot
    of memory usage in the process), we just keep an external counter of
    what is missing and update that counter whenever the peer sends us a new
    message.
    
    isASeeder then becomes a counter lookup.
Commits on Apr 5, 2010
  1. Get rid of CML in description.

    authored
  2. Remove a TODO mentioning CML.

    authored
  3. Correct wrong versions.

    authored
  4. Merge branch 'stm-supervisor-uhoh'

    authored
    Conflicts:
    	TODO.md
Commits on Apr 4, 2010
  1. Fix issue #3.

    authored
    The problem manifests itself because of this:
    
    Process exiting due to ex: user error
        (P/Blk (1913,Block {blockOffset = 409600, blockSize = 16384})
            is in the HaveBlocks set
    
        Trace: ["StoreBlock 266 Block {blockOffset = 507904, blockSize = 16384}",
                "GrabBlocks 6",
                "StoreBlock 1537 Block {blockOffset = 278528, blockSize = 16384}",
                "StoreBlock 1670 Block {blockOffset = 442368, blockSize = 16384}",
                "StoreBlock 1790 Block {blockOffset = 409600, blockSize = 16384}",
                "GrabBlocks 6",
                "StoreBlock 910 Block {blockOffset = 196608, blockSize = 16384}",
                "StoreBlock 910 Block {blockOffset = 180224, blockSize = 16384}",
                "StoreBlock 1765 Block {blockOffset = 180224, blockSize = 16384}",
                "StoreBlock 910 Block {blockOffset = 442368, blockSize = 16384}",
                "StoreBlock 263 Block {blockOffset = 360448, blockSize = 16384}",
                "StoreBlock 1670 Block {blockOffset = 0, blockSize = 16384}",
                "StoreBlock 361 Block {blockOffset = 409600, blockSize = 16384}",
                "StoreBlock 476 Block {blockOffset = 65536, blockSize = 16384}",
                "StoreBlock 1670 Block {blockOffset = 229376, blockSize = 16384}",
                "StoreBlock 1670 Block {blockOffset = 327680, blockSize = 16384}",
                "StoreBlock 1670 Block {blockOffset = 131072, blockSize = 16384}",
                "StoreBlock 1790 Block {blockOffset = 0, blockSize = 16384}",
                "StoreBlock 266 Block {blockOffset = 491520, blockSize = 16384}",
                "StoreBlock 1537 Block {blockOffset = 294912, blockSize = 16384}",
                "StoreBlock 1670 Block {blockOffset = 425984, blockSize = 16384}",
                "StoreBlock 1790 Block {blockOffset = 393216, blockSize = 16384}",
                "StoreBlock 910 Block {blockOffset = 163840, blockSize = 16384}",
                "PutbackBlocks [(387,Block {blockOffset = 475136, blockSize = 16384}),
                                (476,Block {blockOffset = 196608, blockSize = 16384}),
                                (476,Block {blockOffset = 344064, blockSize = 16384}),
                                (525,Block {blockOffset = 212992, blockSize = 16384}),
                                (830,Block {blockOffset = 327680, blockSize = 16384}),
                                (910,Block {blockOffset = 311296, blockSize = 16384}),
                                (1644,Block {blockOffset = 409600, blockSize = 16384}),
                                (1765,Block {blockOffset = 196608, blockSize = 16384}),
                                (1765,Block {blockOffset = 245760, blockSize = 16384}),
                                (1790,Block {blockOffset = 360448, blockSize = 16384}),
                                (1790,Block {blockOffset = 491520, blockSize = 16384}),
                                (1913,Block {blockOffset = 278528, blockSize = 16384}),
                                (1913,Block {blockOffset = 409600, blockSize = 16384}),
                                (1926,Block {blockOffset = 475136, blockSize = 16384})]",
                "AskInterested",
                "PeerHave [530]",
                "AskInterested",
                "PeerHave [899]",
                "AskInterested",
                "PeerHave [1478]",
                "StoreBlock 263 Block {blockOffset = 278528, blockSize = 16384}",
                "StoreBlock 387 Block {blockOffset = 458752, blockSize = 16384}",
                "AskInterested",
                "PeerHave [1919]",
                "AskInterested",
                "PeerHave [1304]",
                "StoreBlock 387 Block {blockOffset = 442368, blockSize = 16384}",
                "AskInterested",
                "PeerHave [990]",
                "AskInterested"])
    
      The problem is in the endgame when a peer disconnects. Then his blocks are put back,
      but others might have downloaded them.
    
    The hypothesis is true. putBackBlock in PieceMgr ignores the case where
    another peer has downloaded the block. We now check for this and only
    put it back if it is not the case.
Something went wrong with that request. Please try again.