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

VDOM guards, sparse resource nodes and container to content injection #103

Open
wants to merge 30 commits into
base: develop
Choose a base branch
from

Conversation

Tamschi
Copy link
Owner

@Tamschi Tamschi commented Feb 28, 2022

This pull request enables and optimises meta state management infrastructure, which effectively means that component instantiation should now be significantly faster, and that an implicitly content-invalidated VDOM cache like the following is now possible:

use asteracea::components::Remember;
use lignin::ThreadSafe;

// asteracea::component! ( Content()() […] );

asteracea::component! {
    RarelyChanged()()

    <*Remember::<ThreadSafe>
        <*Content>
    >
}

Remember is able to re-inject dyn Invalidator with a wrapper notifying itself of changes.
Content then extracts only this wrapper instead of the original instance, so internal changes can become visible despite not setting up explicit invalidation via Remember's .or_unless parameter.

# Conflicts:
#	src/include/async_.rs
#	src/services/invalidator.rs
@Tamschi Tamschi added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Feb 28, 2022
@Tamschi Tamschi added domain: Rust Involves Rust code. priority: first I'll try to take care of this soon-ish if nobody else does. effort: 5 Relative effort required. There's no specific unit of measurement. type: fix Iterations on existing features or infrastructure state: approved Approved to proceed. work: complicated A specific goal already exists, but the path there isn't certain. labels Feb 28, 2022
@Tamschi Tamschi self-assigned this Feb 28, 2022
@Tamschi
Copy link
Owner Author

Tamschi commented Feb 28, 2022

Waiting a bit to see how rust-lang/rust-clippy#8484 will be handled (in the least pressuring way possible. I can likely figure out some kind of workaround, even if it would reduce the readability of the generated code a bit).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: Rust Involves Rust code. effort: 5 Relative effort required. There's no specific unit of measurement. priority: first I'll try to take care of this soon-ish if nobody else does. state: approved Approved to proceed. type: feature Brand new functionality, features, pages, workflows, endpoints, etc. type: fix Iterations on existing features or infrastructure work: complicated A specific goal already exists, but the path there isn't certain.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant