Only run the routing algorithm when RA updates#70
Open
periodically-makes-puns wants to merge 5 commits intomockingbirdnest:masterfrom
Open
Only run the routing algorithm when RA updates#70periodically-makes-puns wants to merge 5 commits intomockingbirdnest:masterfrom
periodically-makes-puns wants to merge 5 commits intomockingbirdnest:masterfrom
Conversation
pleroy
reviewed
Mar 15, 2026
Telecom/telecom.cs
Outdated
| private KSP.UI.Screens.ApplicationLauncherButton toolbar_button_; | ||
|
|
||
| internal RuntimeMetrics runtimeMetrics_ = new RuntimeMetrics(); | ||
| internal bool do_refresh = false; |
Member
There was a problem hiding this comment.
Trailing underscore in member variable names (2x).
Telecom/network.cs
Outdated
| refresh_watch_.Stop(); | ||
| metrics.num_fixed_update_iterations_++; | ||
| metrics.fixed_update_runtime_ = refresh_watch_.Elapsed.TotalMilliseconds; | ||
| metrics.num_iterations_++; |
Member
There was a problem hiding this comment.
I think that Skopos generally uses pre-increment as it is potentially a bit faster (no need to retain the previous value).
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If RA has not updated since the last time we ran the routing algorithm, there is no point in re-running it - we will obtain the same result.
Currently, this makes the game run at slideshow pace on rails warp, since this effectively makes RA runs block the current FixedUpdate for 20ms or so while Skopos routes its connections. However, this makes standard gameplay much more bearable, since we only run the routing algorithm 4-5 times per second instead of every physics tick.
Once we combine this with a suitable routing algorithm optimisation, Skopos routing-related lag should essentially become unnoticeable.