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

Adds EffectsManager #1310

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Adds EffectsManager #1310

wants to merge 2 commits into from

Conversation

pzuraq
Copy link
Member

@pzuraq pzuraq commented May 19, 2021

This PR finishes up the autotracking refactors that were done
previously, making after-render effects that used to be handled by the
render transaction handled instead by an EffectsManager. The
EffectsManager essentially manages a number of caches, which it keeps
in lists internally. Every time a render completes, these queues are
scheduled to run, with every cache in the queue being checked in order
to see if something has changed. If it has, the effect runs its update.

The biggest change with this refactor is that the
didCreate/didUpdate hooks used by classic components will now
interleave with modifiers. Previously, they always ran before all
modifiers, regardless of whether the modifiers were children of a given
component. In theory, this shouldn't be an issue, but if it is we can
separate out the component hooks into a separate queue and restore the
previous ordering.

Supercedes #1061

@pzuraq pzuraq force-pushed the make-modifiers-cache-based branch from 8e1229f to d244845 Compare May 19, 2021 23:57
@pzuraq pzuraq mentioned this pull request May 20, 2021
This PR finishes up the autotracking refactors that were done
previously, making after-render effects that used to be handled by the
render transaction handled instead by an EffectsManager. The
EffectsManager essentially manages a number of caches, which it keeps
in lists internally. Every time a render completes, these queues are
scheduled to run, with every cache in the queue being checked in order
to see if something has changed. If it has, the effect runs its update.

The biggest change with this refactor is that the
`didCreate`/`didUpdate` hooks used by classic components will now
interleave with modifiers. Previously, they always ran _before_ all
modifiers, regardless of whether the modifiers were children of a given
component. In theory, this shouldn't be an issue, but if it is we can
separate out the component hooks into a separate queue and restore the
prevous ordering.
@pzuraq pzuraq force-pushed the make-modifiers-cache-based branch from d244845 to 5a5d0d9 Compare May 22, 2021 21:35
@NullVoxPopuli
Copy link
Contributor

What's left?
I'll very happily take this across the finish line

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.

None yet

2 participants