-
Notifications
You must be signed in to change notification settings - Fork 30
[Performance]Timers improvements #877
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
Conversation
Public Interface+ public struct DefaultTimer: Timer
+
+ public static func publish(every interval: TimeInterval)-> AnyPublisher<Date, Never>
|
Generated by 🚫 Danger |
SDK Size
|
Public Interface+ public struct DefaultTimer: Timer
+
+ public static func publish(every interval: TimeInterval,file: StaticString = #file,function: StaticString = #function,line: UInt = #line)-> AnyPublisher<Date, Never>
|
8808152 to
76ddf7d
Compare
Public Interface+ public struct DefaultTimer: Timer
+
+ public static func publish(every interval: TimeInterval,file: StaticString = #file,function: StaticString = #function,line: UInt = #line)-> AnyPublisher<Date, Never>
|
Public Interface+ public struct DefaultTimer: Timer
+
+ public static func publish(every interval: TimeInterval,file: StaticString = #file,function: StaticString = #function,line: UInt = #line)-> AnyPublisher<Date, Never>
|
Public Interface+ public struct DefaultTimer: Timer
+
+ public static func publish(every interval: TimeInterval,file: StaticString = #file,function: StaticString = #function,line: UInt = #line)-> AnyPublisher<Date, Never>
|
| /// cancels previous subscriptions when the coordinator changes. | ||
| /// | ||
| /// - Parameter peerConnectionCoordinator: The coordinator to observe. | ||
| /// - Parameter peerConnectionCoordinator: The coordinator to observe. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happened here?
| /// | ||
| /// All scheduled timers are executed on the provided dispatch queue, which | ||
| /// allows running timers off the main thread in background contexts. | ||
| protocol Timer { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the same implementation we have on chat? Since both products should use the same implementation eventually, from StreamCore.
Public Interface+ public struct DefaultTimer: Timer
+
+ public static func publish(every interval: TimeInterval,file: StaticString = #file,function: StaticString = #function,line: UInt = #line)-> AnyPublisher<Date, Never>
|
|



🎯 Goal
This revision attempts to improve performance by moving recurring Timers from the main thread to a background thread.
🛠 Implementation
We are extending the existing Timer control to:
🎨 Showcase
Add relevant screenshots and/or videos/gifs to easily see what this PR changes, if applicable.
☑️ Contributor Checklist