tokopedia / RxComposableArchitecture

RxComposableArchitecture is a forked of Composable Architecture with adjustment to make it work with UIKit.
Apache License 2.0
31 stars 5 forks source link

Use deferred instead of removeFirst() when sending action #57

Closed adityadaniel closed 1 year ago

adityadaniel commented 2 years ago

To squeze even more performance, we could employ this deferred method to process actions

Updated benchmark

name                                                               time          std        iterations
------------------------------------------------------------------------------------------------------
Effects.Merged Effect.none (create, flat)                           31708.000 ns ± 130.98 %      34983
Effects.Merged Effect.none (create, nested)                         65875.000 ns ±  73.53 %      21413
Effects.Merged Effect.none (sink)                                  117875.000 ns ±  11.41 %      12151
Store scoping.Nested store                                          22208.000 ns ±  43.25 %      57983
[NEW] Store scoping, with rescope.[NEW] Nested store, with rescope   7500.000 ns ±   7.48 %     185106
[NEW] Store scoping, with rescope and deferred                       7000.000 ns ±   6.89 %     199209