Hoe does the number of reactive roots in an application scale? #1700
sualehasif
started this conversation in
General
Replies: 1 comment
-
You can have a look at the creation of such a root yourself: https://github.com/solidjs/solid/blob/main/packages/solid/src/reactive/signal.ts#L139 It's just a single object with 4 properties and the creation and execution of a tracking function. You can synchronously create tens of thousands of them even on a low-level mobile device without significant impact. You can use batch and createDeferred to influence the timing of execution, should performance become an issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are currently working on a large existing TypeScript codebase and are in the process of integrating approximately 100 SolidJS reactive roots throughout the application. As the complexity of our application grows, we anticipate the number of reactive roots to increase as well. Given that we do not have a comprehensive understanding of fine-grained reactivity, we are curious about the fixed costs associated with creating a new reactive root and how this might impact our application's performance.
Additionally, we are concerned about potential issues that may arise when there are a significant number of reactive roots (approximately 1,000) connected to a single global Solid Store. Specifically, we are wondering if there could be a back-pressure problem for updates due to the synchronous nature of these updates, rather than being asynchronous. This concern stems from the possibility of updates becoming queued up and creating a bottleneck in the application.
Beta Was this translation helpful? Give feedback.
All reactions