-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Track execute()
and enqueue()
tasks separately from scheduled tasks.
#2645
Track execute()
and enqueue()
tasks separately from scheduled tasks.
#2645
Commits on Feb 13, 2024
-
Track
execute()
andenqueue()
tasks separately from scheduled tasks.Motivation: `SelectableEventLoop` uses `ScheduledTask` to track tasks scheduled for some specific point in time, but also tasks that are supposed to be executed immediately. This casuse performance issues where the number of immediate tasks grows, as they need to be kept sorted in the `_scheduledTasks` `PriorityQueue`. Additionally, that datastructure is protected by lock(s) which casues lock contention from other threads. Finally, immediate tasks differ from future scheduled tasks in that they don't have a `failFn` to handle destruction at the end of `SelectableEventLoop.run()` execution. Modifications: * Modify `ScheduledTask` to only track closure tasks and require `failFn` to be provided. * Retain `UnderlyingTask` for tracking closure or `ErasedUnownedJob` for async-await tasks. * Add `SelectableEventLoop._immediateTasks` to track immediate tasks (collection of `UnderlyingTask`-s). * Split production / consumption of the tasks to match the datastructure changes described above. * Modify the `defer` block of `SelectableEventLoop.run()` to execute immediate tasks, instead of dropping them silently. Result: Performance of workloads relying on queuing lots of tasks gets better.
Configuration menu - View commit details
-
Copy full SHA for 5751d70 - Browse repository at this point
Copy the full SHA 5751d70View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b7ad7d - Browse repository at this point
Copy the full SHA 1b7ad7dView commit details -
Adjust allocation limit for nighly.
Match 5.10 change made here: apple@e4102ae#diff-660361849e6074a975e1787c5836a6138eef55096f2b80fb76d5da0af73b48d5R40
Configuration menu - View commit details
-
Copy full SHA for 9237e57 - Browse repository at this point
Copy the full SHA 9237e57View commit details -
Reuse same arrays for scheduled/immediate tasks when shutting Selecta…
…bleEventLoop down.
Configuration menu - View commit details
-
Copy full SHA for a51573a - Browse repository at this point
Copy the full SHA a51573aView commit details
Commits on Feb 14, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 83f378c - Browse repository at this point
Copy the full SHA 83f378cView commit details -
Configuration menu - View commit details
-
Copy full SHA for f76e65b - Browse repository at this point
Copy the full SHA f76e65bView commit details -
Configuration menu - View commit details
-
Copy full SHA for b792b90 - Browse repository at this point
Copy the full SHA b792b90View commit details -
Configuration menu - View commit details
-
Copy full SHA for a504c38 - Browse repository at this point
Copy the full SHA a504c38View commit details -
Update Sources/NIOPosix/SelectableEventLoop.swift
Co-authored-by: Johannes Weiss <johannesweiss@apple.com>
Configuration menu - View commit details
-
Copy full SHA for e3d4edc - Browse repository at this point
Copy the full SHA e3d4edcView commit details
Commits on Feb 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c40f0c2 - Browse repository at this point
Copy the full SHA c40f0c2View commit details
Commits on Feb 28, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 6b893ca - Browse repository at this point
Copy the full SHA 6b893caView commit details
Commits on Mar 4, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3f66019 - Browse repository at this point
Copy the full SHA 3f66019View commit details -
Merge remote-tracking branch 'gmilos/gm-selectableeventloop-job-queue…
…ing-optimisations' into gm-selectableeventloop-job-queueing-optimisations
Configuration menu - View commit details
-
Copy full SHA for b36f381 - Browse repository at this point
Copy the full SHA b36f381View commit details -
Merge remote-tracking branch 'origin/main' into gm-selectableeventloo…
…p-job-queueing-optimisations
Configuration menu - View commit details
-
Copy full SHA for 7b55f61 - Browse repository at this point
Copy the full SHA 7b55f61View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b818e6 - Browse repository at this point
Copy the full SHA 8b818e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for c7a6ece - Browse repository at this point
Copy the full SHA c7a6eceView commit details
Commits on Mar 5, 2024
-
Bump allocation count for scheduling_10000_executions to account for …
…Deque growth properties
Configuration menu - View commit details
-
Copy full SHA for 4fb9f15 - Browse repository at this point
Copy the full SHA 4fb9f15View commit details -
Configuration menu - View commit details
-
Copy full SHA for b8861d9 - Browse repository at this point
Copy the full SHA b8861d9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7555cc5 - Browse repository at this point
Copy the full SHA 7555cc5View commit details -
Configuration menu - View commit details
-
Copy full SHA for e829497 - Browse repository at this point
Copy the full SHA e829497View commit details