-
-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
Description
Currently Workflow.fix({ updater }) runs through all the items in the Buffer. Could the procedure be optimized? There is a suggestion to convert updater into predicate function or provide breaking callback:
// predicate
this.datasource.adapter.fix({
updater: ({ data }: { data: MyItem }) => {
if (this.needToUpdate(data)) {
this.updateItem(data);
return true;
}
}
});
// callback
this.datasource.adapter.fix({
updater: ({ data }: { data: MyItem }, callback: Function) => {
if (this.needToUpdate(data)) {
this.updateItem(data);
callback();
}
}
});Source: issue 121