Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fx Rewrite #24

Merged
merged 58 commits into from
Jan 10, 2024
Merged

Fx Rewrite #24

merged 58 commits into from
Jan 10, 2024

Conversation

TylorS
Copy link
Owner

@TylorS TylorS commented Dec 23, 2023

This is another rewrite of the core Fx abstraction. Primarily the goal is to better manage scopes, and the timely interruption when portions of the stream graph are no longer needed. Also Scope is more often exposed in the R of your Fx when it is being utilized internally to an operator, to make it clear Scopes are being utilize and they are to be attached to an outer/parent Scope.

In addition to the Scope-related changes, performance optimizations have taken place regarding fusion, closure creation, diffing and more. Overall the performance is either exactly the same, but in many common cases 2-10x faster than the current version.

Furthermore a large refactoring of RefSubject has taken place, removing the many methods it had in favor of functions in the RefSubject module itself to allow for better tree-shaking of operators you might not need. The Computed/Filtered modules have also been removed and merged into the RefSubject module, as Computed + Filtered types have no purpose without a source RefSubject. Many of the operators like tuple/struct now accept any of the three types and will return the correct type accordingly.

Sinks have been refactored to remove the need for Sink.Sink<E, A> and Sink.WithContext<R, E, A> to just Sink.Sink<R, E, A>, as well as many new functions.

A Push module has been introduced to represent types which are both an Fx and a Sink, but which might not have the same values for its inputs as its outputs.

@TylorS TylorS marked this pull request as draft December 23, 2023 07:59
@TylorS TylorS marked this pull request as ready for review January 10, 2024 02:01
@TylorS TylorS merged commit 779a2f1 into development Jan 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant