nsreed / ouronote

Real-time collaborative whiteboard web app built with Angular, GUN, and paper.js.
17 stars 1 forks source link

Performance issues with multiple tabs #22

Open nsreed opened 3 years ago

nsreed commented 3 years ago

@ultimape experienced performance problems when opening ouronote in multiple tabs. In addition to performance issues on the machine which had multiple tabs open, other devices on the local network may have stopped synchronizing entirely until the additional tabs were closed. This issue should be expanded on, as this is only my understanding of the problem.

ultimape commented 2 years ago

Seems to be some kind of rhythmic spiking when a view and edit page are open to the same drawing at the same time. The browser windows were going form 0% to 100% and back. Not sure what was driving it.

image

nsreed commented 2 years ago

A couple of ideas that have come up:

  1. WebRTC may be cross-talking between tabs (in both confirmed cases, there was also a tab open on another machine, so that could play a role)
  2. There's currently redundant put() calls being made by the gun-paper bridge when incoming changes happen. This could be ping-ponging potentially large sets of changes back and forth between instances.