FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

Summarizing container hurts responsiveness

Open vladsud opened this issue 6 years ago • 4 comments

Notes based on Igor's feedback and Team's thread

There are other reasons for unresponsiveness (like we are breaking op processing into chunks and yielding between batches every once in a while to let other activity go through).

  1. We create summarizing container right away on becoming connected (which happens right after processing a ton of ops for main container).  Can we have some delay / maybe heuristic to know when there is some idleness?

  2. I'm not sure this is Igor's issue, but we could be more efficient by not closing summarizing container on loss of connection (which happens frequently due to PUSH closing socket). Instead of starting expensive process of hydrating new summarizing container after main one connects, we can have some fuzzy logic to reuse old container in some cases. For example, if we reconnect within next 15 seconds, processing ops would be more efficient. Or even better - if re-connection and processing of ops by main container was fast / did not include summary acks, then processing of ops is preferred over starting new summarizing container.

  3. We have awaits in many places, but these places are unlikely to yield enough time for user-critical tasks. Should we insert in various places calls that would assess duration between those calls and if too much time elapsed, they would use timer to yield some amount of time for other things?

vladsud avatar Jan 15 '20 01:01 vladsud

Created issue #1088 to track (1) above.

arinwt avatar Jan 30 '20 22:01 arinwt

As a note, (2) above was partially addressed in work to recover documents and reinforcing the SummaryManager state machine.

Now when a summarizer client is created, it will always call run on that created one. So for fast disconnect reconnect scenarios, we won't be respawning as many as possible in between these transitions, we will be waiting for the summarizer client to finish connecting and then disconnecting before taking additional actions. This should reduce the overhead between states a bit.

There is still more room for improvement here, so I'll leave this issue open.

Referencing PR: #1838.

arinwt avatar Apr 25 '20 01:04 arinwt

Related: #3969 (if not dupe...)

markfields avatar Oct 26 '20 22:10 markfields

Yes, it's a dup and not worth keeping.

vladsud avatar May 28 '21 18:05 vladsud