-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make inactive nodes mark their children as dirty on setInactive
This moves the setting of dirty nodes out of the collectChanges method. When using long-polling push, the client keeps asking for changes from the server. The server then collects all the changes and sends to the client. The problem is: a child node is always considered `dirty`, if its parent is invisible, and the node is always included in the changes sent to the client. Since there's not a single moment where there's nothing to send, the server keeps sending the changes, and the client keeps asking for the changes. This creates a busy loop between client and server, which only ends when the parent node is made visible again. To prevent this, this patch changes this logic to make the children nodes only dirty when the parent visibility changes.
- Loading branch information
1 parent
1dbc8f0
commit c8a30cb
Showing
2 changed files
with
48 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters