Replies: 1 comment 1 reply
-
|
Hi @qadir1020, Thanks for the RFC. I'm not sure I agree with your conclusion. My understanding of channels is that they already implement a pub-sub pattern. Subscribers only get notified for event IDs they subscribed to, not for other events. Addons themselves do not handle queue filtering either, this is done centrally within the channel. Only the channel keeps track of its subscribers. Please let me know if I've misunderstood your intention, but I believe as of now that there is nothing needing changing in how Channels are architectured. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
The current Storybook Channel acts as a flat, broadcast event bus where
channel.emit(eventName, payload)delivers notifications to all registered subscribers across the Manager-Preview iframe boundary. As an application scales to include N active addons, a single story-selection action triggers O(N) spurious event deliveries to components completely unrelated to that specific event hook, introducing noticeable UI thread rendering lag.Describe the solution you'd like
I have opened a working Pull Request here: #35039 introducing an opt-in, topic-routing architectural layer (incorporating Broker Topologies and Publisher-Subscriber Patterns) built directly on top of the existing window postMessage transport mechanism.
Key Aspects:
Baseline testing demonstrated a 51% quantitative performance reduction in cold-start Time-to-Interactive (TTI), optimizing rendering latencies from 3.80s down to 1.85s.
Describe alternatives you've considered
Keeping the flat broadcast bus layout, which heavily limits horizontal scalability as the addon ecosystem expands.
Are you able to assist to bring the feature to reality?
yes, I can
Additional context
A complete working architectural prototype has been implemented and submitted for review. The full code changes, namespaced pathways, and legacy API wrapper shims can be found in the accompanying Pull Request.
Beta Was this translation helpful? Give feedback.
All reactions