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

vision_transparency_cache improvements #78104

Merged
merged 8 commits into from
Nov 29, 2024

Conversation

Procyonae
Copy link
Contributor

Summary

Performance "vision_transparency_cache isn't rebuilt if transparency_cache_dirty isn't set"

Purpose of change

Fixes #78092

Describe the solution

vision_transparency_cache rebuilds regardless of player z level
vision_transparency_cache only rebuilds if transparency_cache_dirty is set (which as far as I can tell it should be everywhere relevent)

Will probably add a vision_transparency_cache_dirty

Describe alternatives you've considered

Planning on attempting a followup PR making translucency non binary

Testing

Load save from linked issue, wait in place until daylight (20hr). Before it took 59s now it takes 34s.
Before hotpath for building the vision_transparency_cache was ~50% now it's ~0.02%
Tested that running past a window with Digitigrade Legs, Paws and Beast "correctly" obscured vision

Additional context

@Procyonae Procyonae force-pushed the TranslucencyPerformance branch from 4f0704a to 932c0e9 Compare November 23, 2024 21:37
@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) Code: Performance Performance boosting code (CPU, memory, etc.) json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Nov 23, 2024
@zakhad
Copy link

zakhad commented Nov 24, 2024

2024-11-24.03-19-33.mp4
2024-11-22.23-16-24.mp4

Been trying to figure out why my game has been running abysmally slow is this related? as it comes and goes when my game suddenly goes slow, for a while idk a few days, then suddenly fast again.

  • OS: Windows
    • OS Version: 7
  • Game Version: 78d8461 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Stats Through Skills [StatsThroughSkills],
    SpeedyDex [speedydex],
    Disable NPC Needs [no_npc_food],
    Medieval Mod Reborn [Medieval_Mod_Reborn],
    Tamable Wildlife [Tamable_Wildlife],
    Mind Over Matter [mindovermatter],
    Bombastic Perks [bombastic_perks],
    Slowdown Fungal Growth [no_fungal_growth]
    ]

@Procyonae
Copy link
Contributor Author

Procyonae commented Nov 24, 2024

It could be but I can't really magically tell that without a save where it can be reproduced

@zakhad
Copy link

zakhad commented Nov 24, 2024

It could be but I can't really magically tell that without a save where it can be reproduced

I have updated today, to see if any recent changes have helped, but it has not.

  • OS: Windows
    • OS Version: 7
  • Game Version: 71b3dbe [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Stats Through Skills [StatsThroughSkills],
    SpeedyDex [speedydex],
    Disable NPC Needs [no_npc_food],
    Medieval Mod Reborn [Medieval_Mod_Reborn],
    Tamable Wildlife [Tamable_Wildlife],
    Mind Over Matter [mindovermatter],
    Bombastic Perks [bombastic_perks],
    Slowdown Fungal Growth [no_fungal_growth]
    ]
    https://discord.com/channels/598523535169945603/598523535169945607/1309656626814390365
    here is a video in discord i shared as i have no nearby lab that's close enough where i believe i can discount this as an influence

https://github.com/user-attachments/assets/4f33c550-1bd5-4eaa-97da-5c348fb24c84
Zakhadia_BigCity-trimmed.tar.gz

2024-11-24.20-47-31.mp4

My issue is that the game goes slow for a while but then after a while uncertain honestly a few days, it resumes playing at "normal" speed i can't for the life of my figure out why this is happening so i presume it's some sort of cache issue which made me wondered if this pr would fix it,

Thank you for your time.

@zakhad
Copy link

zakhad commented Nov 25, 2024

Zakhadia_BigCity-trimmed.tar.gz

This is another save where now my game is running fast again, all i've been doing is tailoring repair jobs for the most part in the same location, i have been disassembling clothing after repairing them, one to improve my skill and 2 to get more resources from some of the items.

What i did notice was when i was forced to restart just after making this save i was going to make a recording on OBS to prove it was faster, (I couldn't get the screen to capture for some reason, unrelated) as soon as the game loaded up again it went really slow again.

@Procyonae
Copy link
Contributor Author

Procyonae commented Nov 25, 2024

Your slowdown is something EOC related so I'd open up an issue for it (Here's the eocs.output renamed so I can upload it if anyone wants to take a gander now)
eocs.txt

Edit: Renech and Guardian figured it out, see linked PR below

@Procyonae Procyonae marked this pull request as ready for review November 25, 2024 20:57
@GuardianDll
Copy link
Member

lol, it was closed because of #78136?

@GuardianDll GuardianDll reopened this Nov 26, 2024
@Night-Pryanik
Copy link
Contributor

That's weird. I didn't know that a PR could close another PR.

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Nov 28, 2024
@Night-Pryanik Night-Pryanik merged commit e8d3c45 into CleverRaven:master Nov 29, 2024
20 of 26 checks passed
@GuardianDll GuardianDll deleted the TranslucencyPerformance branch November 29, 2024 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Code: Performance Performance boosting code (CPU, memory, etc.) json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reduced performance
4 participants