Closed davidkpiano closed 2 years ago
Can this help with inspecting a service with hundreds of actors? The inspector takes absolutely forever to start up in this case at the moment
Can this help with inspecting a service with hundreds of actors? The inspector takes absolutely forever to start up in this case at the moment
That's a good consideration - can you identify specifically what the bottleneck is?
Look like the bottleneck right now is that a message is sent for each actor. This RFC appears to solve the issue via the @xstate/inspect.actors
event - cool!
Notes from @Andarist:
devTools
(global configuration?)TODO: consider a "restart" event that the inspector can send the client for individual actors? cc. @farskid
This looks great. I think the notes that @Andarist made are important for the implementation I made for storybook - particularly Need a way for the client to request actor snapshots from inspector at any time
. Putting the inspector in as a storybook addon requires use of the storybook “message bus” to get from the iframe with running machines to the iframe that the devtools are loaded in, which is in essence another postmessage system. This indirection leads to very long startup times for the addon as I have to make sure that everything is started up in sequence meaning that sometimes I can’t catch the first few events on startup.
one other thing I did in the addon was to alter the default of devTools as passed to inspect here: https://github.com/SimeonC/storybook-xstate-addon/blob/main/src/preset/withXstateInspector.ts#L18
View rendered text