-
Notifications
You must be signed in to change notification settings - Fork 989
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
[Bug] Hyperspace lag when transitioning between systems when compiled using the debug profile #10068
Comments
Have you checked whether the "extended jump effects" preference setting is different between these? |
I suspect this is a result of conditional links. Edit: also, which artifacts were you downloading from each PR? The CI (only gives the executable, no game data) or CD (the full package you would download from the release page)? |
Yes; I tried alternating through all three settings (Medium, Heavy, and Off).
Somewhere between those two extremes. Neither a 15 year old low power CPU, nor a brand new power guzzler:
The download from the cloaking variation was the full CD; while the Boarding combat one was just the exe (so the CI). I downloaded a third, but I forget which one it was at this point. (and the artifacts don't have much in terms of identifiers) |
Testing with a couple of laptops, one has an Intel 7200U, the other has an Intel 5300U. (Both being faster than the first computer I played Endless Sky on, with no issues.) |
Thanks for testing. That seems like a confirmation that there's a bug with the way the debug is compiled. Based on my own observation, a change that was pushed to the repository since the 0.10.6 release; since I can still build that and prior branches in debug with no problems. |
It's nothing to do with any change to how it is compiled. It's additional computations introduced by the conditional links feature. |
I've done some more testing, this time, measuring the time spent in the call to In particular, I noticed that the lag on departure and system transition is noticeable when the laptop is on a power mode other than "best performance" on Release, which is a problem.
Notably, even my desktop can't handle the frame involving I also tested the time spent in A way to make this more visible is to add more systems. |
The issue is that the conditional links PR makes the game recalculate the linkages between every system every time the day changes. This is an O(N^2) operation with a sizable N, especially if you have plugins that add a lot of systems. I think that conditional links should be changed to behave differently. Instead of conditional links requiring that you have the conditions in order for the link to exist, a conditional link should be a link where you need to have the conditions to use it. This way we're not recalculating every link in the game every day, as the link always exists. Instead we would be calculating if you can use a link at the moment that you are attempting to use it, which is a much cheaper operation. |
I do rather like what the conditional links is trying to achieve, and it's not quite the same thing as having permanent links that require specific conditions to use (unless not having those conditions makes the link invisible?) This seems like it might be a good opportunity for some multi-tasking. As in, during the course of a hyperjump the player is locked into a specific animation that takes a bit of time. Likewise for Jump Drives. Might it be possible to have the recalculation process "lock-in" the link that the player is currently taking, and start recalculating all the rest of the links in the background while the player is stuck in the animation; and then "unlock" the link they just used when they reach the destination system and recalculate that link at the end of the jump? |
Note that the question of whether the link exists is not the same thing as whether the link is visible and usable. We could easily make it so that links that are not usable are also not visible, which to the player might as well mean it doesn't exist. Calculating which links exist is expensive. It will always be expensive, and throwing more computing power at it is only delaying the inevitable. Therefore, the existence of links should be calculated as little as possible. |
Sure. Seems like there's really four potential states:
Both the usability and visibility would be controlled by various conditions that generally don't change except when missions end or start, or outfitting changes. So that seems the point where calculations should happen. While people are staring at outfits, watching the hyperspace animation, watching their ship land/take off... There's a variety of points where the player is just watching an animation, and anything the game needs to calculate could be done during these parts to the degree possible. |
I agree that this is a problem.
I prefer a solution where we have conditional links appear and disappear (as is done in the now-reverted implementation) without the performance impact that came with it. (Not sure yet how difficult it would be though.) |
Is there an existing issue for this?
Describe the bug
When hyperjumping from one system to another, at the point of transition there is a brief lag when everything freezes for a moment before arriving in the new system and motion starts again. By brief I mean about half a second or so.
Steps to Reproduce
Expected Behavior
Expected behavior is that which we had in v 0.10.6 and earlier: Seemeless transition without pauses or freezes when he travel from one system to the other, regardless of compiling profile.
Screenshots
No response
Link to save file
No response
Operating System
Windows 10 Pro
Game Source
Built from source
Game Version
Delta, latest upstream, and a variety of points in the past.
Additional Information
Tested setups (same pilot in all cases):
Based on this, it appears that something has changed in how VS compiling the debug version is handled. Everything previously compiled locally under the debug profile and run just fine. I can still compile and run branches from circa v 0.10.6's release date and they run fine; but anything recent and after I compile them they lag when compiled in debug; however they do compile fine when done in "release" profile.
The text was updated successfully, but these errors were encountered: