Created
January 21, 2015 23:05
-
-
Save anonymous/f37c9e6a95ceda2a529d to your computer and use it in GitHub Desktop.
// source http://jsbin.com/tivuqegeko
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
var db = new Dexie('dexie-min'); | |
db.version(44).stores({ | |
libraryAsset: "++,id" | |
}); | |
db.open(); | |
var start = new Date().getTime(); | |
db.transaction("rw", db.libraryAsset, function() { | |
var libraryAssets = []; | |
for (var i = 1; i <= 2000; i++) { | |
var id = i + ""; | |
var model = "XYZAYA-000" + i; | |
var manufacturerID = "213" + i; | |
var la = {id: id, model: model, manufacturerID: manufacturerID}; | |
db.libraryAsset.add(la); | |
} | |
}).then(function () { | |
console.log('took: ', (new Date().getTime() - start), '[ms]'); | |
}); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript"> var db = new Dexie('dexie-min'); | |
db.version(44).stores({ | |
libraryAsset: "++,id" | |
}); | |
db.open(); | |
var start = new Date().getTime(); | |
db.transaction("rw", db.libraryAsset, function() { | |
var libraryAssets = []; | |
for (var i = 1; i <= 2000; i++) { | |
var id = i + ""; | |
var model = "XYZAYA-000" + i; | |
var manufacturerID = "213" + i; | |
var la = {id: id, model: model, manufacturerID: manufacturerID}; | |
db.libraryAsset.add(la); | |
} | |
}).then(function () { | |
console.log('took: ', (new Date().getTime() - start), '[ms]'); | |
}); | |
</script></body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var db = new Dexie('dexie-min'); | |
db.version(44).stores({ | |
libraryAsset: "++,id" | |
}); | |
db.open(); | |
var start = new Date().getTime(); | |
db.transaction("rw", db.libraryAsset, function() { | |
var libraryAssets = []; | |
for (var i = 1; i <= 2000; i++) { | |
var id = i + ""; | |
var model = "XYZAYA-000" + i; | |
var manufacturerID = "213" + i; | |
var la = {id: id, model: model, manufacturerID: manufacturerID}; | |
db.libraryAsset.add(la); | |
} | |
}).then(function () { | |
console.log('took: ', (new Date().getTime() - start), '[ms]'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment