Skip to content

Performance when rendering many components #256

@mattikl

Description

@mattikl

I'm rendering a list that contains Toggle and TextInput components. When this list gets long, the initial render is super slow. Also the subsequent renders of the list are slow, but I can solve this problem in application code by wrapping the Belle components and implementing shouldComponentUpdate.

I did some profiling and noticed that lots of CPU time gets consumed in functions injectStyles and removeStyle. It looks like the performance could be improved by refactoring how the style storage is used and styles updated. I'm thinking immutable data structures and batching the updates. But this is just guessing since I don't know the code well.

Is anyone working on this already? Any thoughts?

I also understand that the main objective in Belle is good UX and the performance optimizations shouldn't interfere with that. Optimal solution for the long list use case would be to use components that only implemented the needed functionality and focus on performance. But I've been happy using Belle so far, so thanks for the great work with it!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions