-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Very naive batching implementation Co-authored-by: Omar <Shenato@users.noreply.github.com> * Batches effects of other batches Co-authored-by: Omar <Shenato@users.noreply.github.com> * Extract batch to a separated module and make it apply to Facet by default * WIP: logging extra usage * Remove log and schedule on effects * Logs scheduler success ration * Rename batch into scheduler * Documentation * Only starts a batch on createFacet if we are notifying a change * Also test useFacetEffect * Keep batch started until the end Making sure to exhaust all tasks before exiting * Fix linter * Expose batch as a public API * Small refactor * Make sure to cancel tasks that are no longer needed Needs unit tests * Testing order of execution of scheduled tasks within batches * Fix cancelation of tasks Still needs unit tests (as previous implementation proved to not be sufficient) * Rename canceled to scheduled * Uses an array to keep track of tasks * Using a "regular for" should be faster More info: https://esbench.com/bench/6317fc2a6c89f600a5701bc9 * Unit test canceling tasks * Cleanup development log, plus some extra docs * Avoids scheduling for first event within a batch Also properly handles exceptions within a batch. --------- Co-authored-by: Omar <Shenato@users.noreply.github.com>
- Loading branch information
1 parent
7105eff
commit c5c7887
Showing
7 changed files
with
464 additions
and
42 deletions.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.