-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
Hello Jason,
I think there is a big performance problem in part of this adapter when using with AngularJS.
If you are calling create
or destroy
on many items (thousands), you end up with $rootScope.$apply
for every item, and huge lags!
Why?
- In this adapter
setTimeout
is called for every injected item here https://github.com/js-data/js-data-localstorage/blob/master/src/index.js#L44 - In each of timeout execution
inject
for that item is invoked - And then js-data-angular call
$apply
as reaction on that https://github.com/js-data/js-data-angular/blob/master/src/index.js#L199
I have replaced setTimeout
for sync callback as hotfix, but I am not sure if thats good.
Metadata
Metadata
Assignees
Labels
No labels