Skip to content

Commit f989749

Browse files
committed
Fixed possible performance issue
1 parent 8875d98 commit f989749

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

dist/js-data-angular.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,11 @@
243243
})(functionsToWrap[k]);
244244
}
245245

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

255253
return store;

dist/js-data-angular.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,13 +233,11 @@
233233
})(functionsToWrap[k]);
234234
}
235235

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

245243
return store;

0 commit comments

Comments
 (0)