Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test excessive Memory Usage #1211

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -1,5 +1,5 @@
/* global FileList */

'use strict'
module.exports = WebTorrent

var Buffer = require('safe-buffer').Buffer
@@ -0,0 +1 @@
module.exports.EventEmitter = require('events').EventEmitter
@@ -1,7 +1,7 @@
module.exports = File

var eos = require('end-of-stream')
var EventEmitter = require('events').EventEmitter
var EventEmitter = require('./events').EventEmitter
var FileStream = require('./file-stream')
var inherits = require('inherits')
var path = require('path')
@@ -8,6 +8,8 @@ function RarityMap (torrent) {
var self = this

self._torrent = torrent
window.test = {}
window.test.torrent = torrent
self._numPieces = torrent.pieces.length
self._pieces = []

@@ -74,6 +76,7 @@ RarityMap.prototype.destroy = function () {
self._onWire = null
self._onWireHave = null
self._onWireBitfield = null
console.warn(self)
}

RarityMap.prototype._initWire = function (wire) {
@@ -7,7 +7,8 @@ var BitField = require('bitfield')
var ChunkStoreWriteStream = require('chunk-store-stream/write')
var debug = require('debug')('webtorrent:torrent')
var Discovery = require('torrent-discovery')
var EventEmitter = require('events').EventEmitter
console.warn('hello events')
var EventEmitter = require('./events').EventEmitter
var extend = require('xtend')
var extendMutable = require('xtend/mutable')
var fs = require('fs')
@@ -62,6 +63,7 @@ try {
}

inherits(Torrent, EventEmitter)
console.warn(Torrent)

function Torrent (torrentId, client, opts) {
EventEmitter.call(this)
@@ -258,7 +260,6 @@ Torrent.prototype._onParsedTorrent = function (parsedTorrent) {
self._rechoke()
}, RECHOKE_INTERVAL)
if (self._rechokeIntervalId.unref) self._rechokeIntervalId.unref()

// Private 'infoHash' event allows client.add to check for duplicate torrents and
// destroy them before the normal 'infoHash' event is emitted. Prevents user
// applications from needing to deal with duplicate 'infoHash' events.
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.