Stop DDOSing ourselves
What does this MR do?
Adds hiddenInterval
to SmartInterval
settings. This will be the interval used whilst the tab is inactive. If this setting is not set it will cancel
as it would have done before.
Adds immediateExecution
to SmartInterval
settings. This boolean will dictate whether to execute the callback once before the first interval or not.
Uses SmartInterval
with the new hiddenInterval
settings to slow the polling for the MR widget on inactive tabs.
Fixes issue where SmartInterval
s visibilitychange
listeners are not getting called because jQuery doesn't support them.
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
We're ddosing ourselves on the MR page.
Screenshots (if relevant)
~30 seconds difference between the first 2 requests (a couple requests had fired already so it's backed off already).
-changed to different tab-
~2 minutes difference between the middle 2 requests.
-changed tab back to MR-
~10 seconds difference between the last 2 requests.
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #24807 (closed)
Merge request reports
Activity
Added 1 commit:
- aa8ba08c - Added hiddenInterval and immediateExecution settings, fixed visibilitychange lis…
@brycepj Do you wanna do the first review here?
Added 1 commit:
- d1f27d7e - Added hiddenInterval and immediateExecution settings, fixed visibilitychange lis…
Added 1 commit:
- d8f68b23 - Added hiddenInterval and immediateExecution settings, fixed visibilitychange lis…
Added 1 commit:
- b86b9701 - Added hiddenInterval and immediateExecution settings, fixed visibilitychange lis…
Marked the task Changelog entry added as completed
Marked the task Documentation created/updated as completed
Marked the task Documentation created/updated as incomplete
Marked the task Conform by the merge request performance guides as completed
Marked the task Conform by the style guides as completed
Marked the task Squashed related commits together as completed
Added 1 commit:
- 91d2ce8b - Added hiddenInterval and immediateExecution settings, fixed visibilitychange lis…