Skip to content
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

Speed limit UI performance drop when train tracks on screen #411

Closed
originalfoo opened this issue Jul 6, 2019 · 5 comments · Fixed by #413
Closed

Speed limit UI performance drop when train tracks on screen #411

originalfoo opened this issue Jul 6, 2019 · 5 comments · Fixed by #413
Labels
BUG Defect detected EXTERNAL Mod conflict or other external factor Overlays Overlays, data vis, etc. SPEED LIMITS Feature: Speed limits

Comments

@originalfoo
Copy link
Member

Had a user saying the speed limits UI was grinding fps:

rlas: When i try to change the speed in lanes and click on the Speed Change icon in TMPE the game slows down to about 1fps. This happens only in that one feature. Hope this can be fixed :D

Later they updated with this:

rlas: i found out that only happens while Railway Replacer Train Tracks are in the visual appearence. in other areas the FPS is stable and normal. It somehow conflicts with the Railway Tracks from R69 and Revo :/ Got a GTX 1060 6GB, AMD FX(tn) 6300 Six Core Processor 3.50 GHz, 40GB RAM, 64 Bit System. Hope this helps. Also if i scroll out so the Speed UI Symbols on tracks or roads disappear the FPS goes also back to normal. So smth is there going on with Railway Replacer. Good luck for ths :)

The assets in question are these:

https://steamcommunity.com/workshop/filedetails/?id=1569088356

Note in particular the "Railway Replacer" mod is part of that colleciton:

https://steamcommunity.com/sharedfiles/filedetails/?id=1530376523

Is it possible that mod is causing some sort of refresh or update per frame, and that could be causing speed limits UI to refresh every frame = fps drop?

@originalfoo originalfoo added BUG Defect detected EXTERNAL Mod conflict or other external factor labels Jul 6, 2019
@DaEgi01
Copy link
Contributor

DaEgi01 commented Jul 6, 2019

checked with only TM:PE labs edition from 2019-07-02 and with + without the railway replacer mod.
I experience is a big reduction in fps (~30 -> ~25) with speed limits on if there are only streets on the screen, but a huge reduction in fps (~30 -> ~6) if there are rail tracks. tested only with vanilla tracks, not with ronyx but don't expect it to make any difference.
subbing or unsubbing to RRM does not seem to have any affect.
I guess what rlas meant is:

i found out that only happens while Train Tracks are in the visual appearence.

@kvakvs
Copy link
Collaborator

kvakvs commented Jul 6, 2019

Just note the rail tracks mod is a huge 1GB+ asset with very high detalization. So in general this mod does not care about performance, but about looks.

Speed limits rendering was not changed when MPH speed limits were added, i.e. it should be the same in TM:PE 10.20. How did this mod behave in 10.20?

@DaEgi01
Copy link
Contributor

DaEgi01 commented Jul 6, 2019

has nothing to do with neither the RRM mod, nor with ronyx 1GB+ assets since the issue happens without the assets and without the mod. I tried to debug it myself and found the root cause of the issue.
check commit 467956 ("Added dummy button to speed limits; added 90 MPH").
its the change made to TextureResources.cs
where Log.Info is triggered if index > SpeedLimit.UPPER_KMPH which is pretty often since its called in a OnToolGUI method.
since I m not sure what kind of information you actually want to spam into the log and what not I can't provide a pull request, but you know now what to do :)

@DaEgi01
Copy link
Contributor

DaEgi01 commented Jul 6, 2019

oh an btw, this bug made it into the official cities skylines youtube channel ;)
see https://www.youtube.com/watch?v=6Iyw4Kqy-FM 56:50
hehe, she admits though that she should not be using labs ^^

@originalfoo
Copy link
Member Author

@DaEgi01 Thanks for tracking down the issue, we'll get it fixed in next release!

@kvakvs A good way to avoid this sort of thing in future is to use Log._Debug() method as that gets completely removed in the RELEASE builds.

originalfoo added a commit that referenced this issue Jul 6, 2019
@originalfoo originalfoo changed the title Speed limit UI performance drop when Ronyx69/REV0 railway assets on screen Speed limit UI performance drop when train tracks on screen Jul 6, 2019
@originalfoo originalfoo added this to the 10.22 Hotfix milestone Jul 6, 2019
@originalfoo originalfoo added SPEED LIMITS Feature: Speed limits Overlays Overlays, data vis, etc. labels Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Defect detected EXTERNAL Mod conflict or other external factor Overlays Overlays, data vis, etc. SPEED LIMITS Feature: Speed limits
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants