Skip to content
Merged

2.0.0 #198

Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed possible performance issue
  • Loading branch information
jmdobry committed Jan 8, 2015
commit f9897490a5b63e849b8f7752ea1c15e6a57c6002
10 changes: 4 additions & 6 deletions dist/js-data-angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,11 @@
})(functionsToWrap[k]);
}

// Hook into the digest loop (throttled)
if (typeof Object.observe !== 'function' ||
typeof Array.observe !== 'function') {
// Hook into the digest loop
if (typeof Object.observe !== 'function' || typeof Array.observe !== 'function') {
$rootScope.$watch(function () {
// Throttle angular-data's digest loop to tenths of a second
return new Date().getTime() / 100 | 0;
}, store.observe.Platform.performMicrotaskCheckpoint);
store.observe.Platform.performMicrotaskCheckpoint();
});
}

return store;
Expand Down
2 changes: 1 addition & 1 deletion dist/js-data-angular.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,11 @@
})(functionsToWrap[k]);
}

// Hook into the digest loop (throttled)
if (typeof Object.observe !== 'function' ||
typeof Array.observe !== 'function') {
// Hook into the digest loop
if (typeof Object.observe !== 'function' || typeof Array.observe !== 'function') {
$rootScope.$watch(function () {
// Throttle angular-data's digest loop to tenths of a second
return new Date().getTime() / 100 | 0;
}, store.observe.Platform.performMicrotaskCheckpoint);
store.observe.Platform.performMicrotaskCheckpoint();
});
}

return store;
Expand Down