Last active
November 27, 2015 13:26
-
-
Save hbi99/e445aef3ef2f986572ca to your computer and use it in GitHub Desktop.
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
// start the timer | |
var start = Date.now(); | |
// get the snapshot with a callback function | |
Defiant.getSnapshot(data, function(snapshot) { | |
console.log('Created snapshot in '+ (Date.now() - start) +' ms'); | |
// searching on snapshot created with web worker | |
var found = JSON.search(snapshot, '//item'); | |
console.log(found); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment