Skip to content

Disable sending updates to client for effectively non-visible nodes - #15885

Merged
mshabarov merged 7 commits into
mainfrom
fix/do-not-send-updates-for-hidden-nodes
May 17, 2023
Merged

mshabarov merged 7 commits into
mainfrom
fix/do-not-send-updates-for-hidden-nodes

Conversation

@tepi

@tepi tepi commented Feb 10, 2023

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

github-actions Bot commented Feb 10, 2023 •

Copy link
Copy Markdown
Contributor

Test Results

   992 files  ±0     992 suites  ±0   1h 32m 50s ⏱️ + 3m 35s
6 281 tests ±0  6 240 ✔️ ±0  41 💤 ±0  0 ❌ ±0 
6 526 runs   - 4  6 478 ✔️  - 4  48 💤 ±0  0 ❌ ±0 

Results for commit 428cc97. ± Comparison against base commit c02dd8a.

♻️ This comment has been updated with latest results.

… has changed if testvalue differs from original value
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@tepi
tepi requested a review from mshabarov February 10, 2023 10:48
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

mshabarov added a commit that referenced this pull request May 17, 2023
…15885) (#16819)

* Disable sending updates to client for effectively non-visible nodes

* Fix test: Always set tested component visible first; only assume node has changed if testvalue differs from original value

* Cleanup, and refactoring, in Element, StateNode, UIInternals classes + mvn formatter.

---------

Co-authored-by: czp13 <61667986+czp13@users.noreply.github.com>
Co-authored-by: Peter Czuczor <czuczor@gmail.com>

(cherry picked from commit eab4f09)

Co-authored-by: Teppo Kurki <teppo.kurki@vaadin.com>
mshabarov added a commit that referenced this pull request May 17, 2023
…15885) (#16818)

* Disable sending updates to client for effectively non-visible nodes

* Fix test: Always set tested component visible first; only assume node has changed if testvalue differs from original value

* Cleanup, and refactoring, in Element, StateNode, UIInternals classes + mvn formatter.

---------

Co-authored-by: czp13 <61667986+czp13@users.noreply.github.com>
Co-authored-by: Peter Czuczor <czuczor@gmail.com>

(cherry picked from commit eab4f09)

Co-authored-by: Teppo Kurki <teppo.kurki@vaadin.com>
mshabarov added a commit that referenced this pull request May 17, 2023
…15885) (#16817)

* Disable sending updates to client for effectively non-visible nodes

* Fix test: Always set tested component visible first; only assume node has changed if testvalue differs from original value

* Cleanup, and refactoring, in Element, StateNode, UIInternals classes + mvn formatter.

---------

Co-authored-by: czp13 <61667986+czp13@users.noreply.github.com>
Co-authored-by: Peter Czuczor <czuczor@gmail.com>

(cherry picked from commit eab4f09)

Co-authored-by: Teppo Kurki <teppo.kurki@vaadin.com>
Co-authored-by: Peter Czuczor <61667986+czp13@users.noreply.github.com>
czp13 added a commit that referenced this pull request May 24, 2023
…odes (#15885) (CP: 1.0)

Manually cherry-picked for 1.0:
- Disable sending updates to client for effectively non-visible nodes
- Fix test: Always set tested component visible first; only assume node has changed if testvalue differs from original value
- Cleanup, and refactoring, in Element, StateNode, UIInternals classes + mvn formatter.
czp13 added a commit that referenced this pull request May 24, 2023
…odes (#15885) (CP: 1.0)

Manually cherry-picked for 1.0 (small changes around the stream peek and the filtering invocations part)
- Disable sending updates to client for effectively non-visible nodes
- Fix test: Always set tested component visible first; only assume node has changed if testvalue differs from original value
- Cleanup, and refactoring, in Element, StateNode, UIInternals classes + mvn formatter.
czp13 added a commit that referenced this pull request May 24, 2023
…odes (#15885) (CP: 1.0)

Manually cherry-picked for 1.0 (small changes around the stream peek and the filtering invocations part, and owner Optional handling)
- Disable sending updates to client for effectively non-visible nodes
- Fix test: Always set tested component visible first; only assume node has changed if testvalue differs from original value
- Cleanup, and refactoring, in Element, StateNode, UIInternals classes + mvn formatter.
czp13 added a commit that referenced this pull request May 24, 2023
…odes (#15885) (CP: 1.0)

Manually cherry-picked for 1.0
New changes through cherry picking:
- small changes around the stream peek (sentToBrowser is not existing in this code base)
- and the filtering invocations part,
- and owner Optional handling,

Old changes:
- Disable sending updates to client for effectively non-visible nodes
- Fix test: Always set tested component visible first; only assume node has changed if testvalue differs from original value
- Cleanup, and refactoring, in Element, StateNode, UIInternals classes + mvn formatter.
mshabarov pushed a commit that referenced this pull request May 26, 2023
…nodes (CP: 1.0) (#16875)

* chore:disable sending updates to client for effectively non-visible nodes (#15885) (CP: 1.0)
Manually cherry-picked for 1.0
New changes through cherry picking:
- small changes around the stream peek (sentToBrowser is not existing in this code base)
- and the filtering invocations part,
- and owner Optional handling,

Old changes:
- Disable sending updates to client for effectively non-visible nodes
- Fix test: Always set tested component visible first; only assume node has changed if testvalue differs from original value
- Cleanup, and refactoring, in Element, StateNode, UIInternals classes + mvn formatter.

* chore: #16836 and #16855 PR-s merged to this one, and fine tuned for this code-base (remove detach listener when javascript execution completes, and nullify registration)
- Added handling Optional<StateNode> for computeIfAbsent and other places,
- Covering test class (and so tests) is/are fully missing from this version (need to add somewhere else),
- Deleted/Commented  invocation.then(callback, callback) as this concept is not existing here, but added other snippet for handling
registration removes,
- Tailored the code to the codebase.
mshabarov added a commit that referenced this pull request Sep 5, 2023
mshabarov added a commit that referenced this pull request Sep 7, 2023
vaadin-bot pushed a commit that referenced this pull request Sep 7, 2023
vaadin-bot pushed a commit that referenced this pull request Sep 7, 2023
vaadin-bot pushed a commit that referenced this pull request Sep 7, 2023
vaadin-bot pushed a commit that referenced this pull request Sep 7, 2023
vaadin-bot pushed a commit that referenced this pull request Sep 7, 2023
vaadin-bot pushed a commit that referenced this pull request Sep 7, 2023
vaadin-bot added a commit that referenced this pull request Sep 7, 2023
Related-to #15885

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
vaadin-bot added a commit that referenced this pull request Sep 7, 2023
Related-to #15885

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
vaadin-bot added a commit that referenced this pull request Sep 7, 2023
Related-to #15885

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
vaadin-bot added a commit that referenced this pull request Sep 7, 2023
* test: Add missing tests for invisible nodes (#17558)

Related-to #15885

* add missing import

---------

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Co-authored-by: caalador <mikael.grankvist@gmail.com>
vaadin-bot added a commit that referenced this pull request Sep 7, 2023
* test: Add missing tests for invisible nodes (#17558)

Related-to #15885

* add missing import

---------

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Co-authored-by: caalador <mikael.grankvist@gmail.com>
vaadin-bot added a commit that referenced this pull request Sep 8, 2023
* test: Add missing tests for invisible nodes (#17558)

Related-to #15885

* add missing import

---------

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Co-authored-by: caalador <mikael.grankvist@gmail.com>
DiegoCardoso added a commit to vaadin/flow-components that referenced this pull request Sep 22, 2026
A cell whose node id the server never binds kept re-arming a retry timeout
forever, at about 2 500 lookups per second per ten cells.

The retry came from #4920 as a workaround for #4919, where Flow sent a grid's
connector calls while withholding the nodes of the hidden grid. Flow fixed that
a month later in vaadin/flow#15885 by holding back the JavaScript of an
invisible component, and a response's JavaScript runs after its tree changes,
so a node id that does not resolve now belongs to a component the server has
already discarded and never arrives.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
DiegoCardoso added a commit to vaadin/flow-components that referenced this pull request Sep 23, 2026
A cell whose node id the server never binds kept re-arming a retry timeout
forever, at about 2 500 lookups per second per ten cells.

The retry came from #4920 as a workaround for #4919, where Flow sent a grid's
connector calls while withholding the nodes of the hidden grid. Flow fixed that
a month later in vaadin/flow#15885 by holding back the JavaScript of an
invisible component, and a response's JavaScript runs after its tree changes,
so a node id that does not resolve now belongs to a component the server has
already discarded and never arrives.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants