Skip to content

performance considerations with immutable data (using S.js variables instead of a state object) #3

@trusktr

Description

@trusktr

Thanks for the description at #2. I was going to make another issue, the topic of which you talked about there.

My use case for custom elements (and libs like this one) is to make element for declaratively describing 3D scenes.

When animating things, I want to try to keep memory from growing as much as possible. I was concerned about the immutable state changes leaving the garbage collector with many objects to collect after updating properties every frame of an animation and thus making the graphics stutter.

(imagine graphically rich web games)

In the other thread you mentioned

You can technically use Solid renderer without the State object with S.js signals and it would be more performant (and be hard to tell apart from Surplus)

Interesting! That makes me curious about using solid with S.js and not using the state API. Can you make a small example snippet of using S.js signals instead of the state API?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions