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

Fix/optimize morph derivation from component #1696

Merged
merged 3 commits into from
Feb 5, 2025

Conversation

merryman
Copy link
Member

Fixes an issue explained here #599 (comment), where when deriving new morphs from a component a completely unnecessary initial application step was performed.
We now avoid that by simply passing the stylized properties directly to the morph constructors. We also avoid overly permature policy application during morph addition that happens for morphs not yet mounted into the world.

@merryman merryman requested a review from linusha January 30, 2025 15:59
Saves up to 40% in performance. The initial application is skipped in favor of just directly passing the style props to the morph constructor.
@merryman merryman force-pushed the fix/optimize-morph-derivation-from-component branch from 04c2c40 to ec17a0e Compare January 31, 2025 11:35
@linusha linusha self-assigned this Feb 4, 2025
lively.morphic/components/policy.js Show resolved Hide resolved
lively.morphic/components/policy.js Outdated Show resolved Hide resolved
lively.morphic/components/policy.js Outdated Show resolved Hide resolved
lively.morphic/components/policy.js Outdated Show resolved Hide resolved
@linusha linusha enabled auto-merge (rebase) February 5, 2025 17:53
@linusha linusha merged commit e76487d into main Feb 5, 2025
4 checks passed
@linusha linusha deleted the fix/optimize-morph-derivation-from-component branch February 5, 2025 17:59
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.

2 participants