var record = { | |
id: idgen(20) , | |
data: { | |
ip: parts[0], | |
agent: parts[1], | |
url: parts[2], | |
referrer: parts[3], | |
mobile: mobile | |
} | |
}; | |
userRecords.push(record); | |
... | |
userRecords.forEach(function(record,index,array) { | |
db.put(record.id,record.data, function(err) { | |
if(err) | |
console.log(clc.redBright.bold('Error inserting user record: ') + err); | |
if (index == array.length-1) | |
console.timeEnd('user-leveldb-write'); | |
}); | |
}); | |
500 records work | |
500K records does not. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment