• Hi Guest!

    We are extremely excited to announce the release of our first Beta1.1 and the first release of our Public AddonKit!
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. For access to the Public AddonKit you must be a Creator tier member. Once subscribed, download instructions can be found here.

    Click here for information and guides regarding the VaM2 beta. Join our Discord server for more announcements and community discussion about VaM2.
  • Hi Guest!

    VaM2 Resource Categories have now been added to the Hub! For information on posting VaM2 resources and details about VaM2 related changes to our Community Forums, please see our official announcement here.
Orifice Dynamics

Plugins + Scripts Orifice Dynamics

Download [<1 MB]
I dug a bit more into memory allocations and implemented reusable pools for all the lists and hashsets.
Even after that, there was still too much memory allocated on every frame.
Appreciate you taking time to improve the plugin, but keep in mind that the garbage collector in these older Unity versions was very crap to begin with:

A more performant incremental GC was introduced for 2022 versions and later as updates to older versions at a maximum of 2019.4:

''Unity’s garbage collector uses the Boehm–Demers–Weiser garbage collector. By default, Unity uses it in incremental mode, which means that the garbage collector splits up its workload over multiple frames, instead of stopping the main CPU thread (stop-the-world garbage collection) to process all objects on the managed heap. This means that Unity makes shorter interruptions to your application’s execution, instead of one long interruption to let the garbage collector process the objects on the managed heap.''

Incremental mode doesn’t make garbage collection faster overall, but because it distributes the workload over multiple frames, GC-related performance spikes are reduced. These interruptions are called GC spikes because they appear as large spikes in the Profiler window’s frame time graph.''



here's the source of the information:

And yes i always use AI to generate pretty much 70% to 80% of the code, then the rest is me manually reviewing the code to fix it & fine tune it. This is why i was able to make numerous plugins in a very short period of time.
 
Appreciate you taking time to improve the plugin, but keep in mind that the garbage collector in these older Unity versions was very crap to begin with:

A more performant incremental GC was introduced for 2022 versions and later as updates to older versions at a maximum of 2019.4.
Yeah, I'm aware of the 2019 GC limitations. Sadly, that's what we have to work with in VAM 1, which is why being frugal on heap allocations is so important.
 
Yeah, I'm aware of the 2019 GC limitations. Sadly, that's what we have to work with in VAM 1, which is why being frugal on heap allocations is so important.
Yeah it kinda sucks, Especially that it is very hard to pinpoint what exactly is causing problems in the heap even for a seasoned programmer like you. For fps optimization it was so much more straight forward by using System.Diagnostics stopwatch to get accurate frame time overhead for each function/ method.

Again, appreciate the time & effort. but i just tested your version and as i suspected the game still freezes momentarily on GC every 20 seconds as it did in my version 🙂
 
the game still freezes momentarily on GC every 20 seconds as it did in my version 🙂
I saw major improvements when genitals were close to contact but not quite touching or inserted. There are likely other game situations and code paths with room for optimization.
 
I saw major improvements when genitals were close to contact but not quite touching or inserted. There are likely other game situations and code paths with room for optimization.
For sure, I just don't think a slight 0.5ms hiccup every 20 seconds is worth all the trouble tbh. What matters to me most is frametime/ fps and it's at a pretty well optimized value atm 👍🏼

But if you do manage to optimize it just post it here again and i'll be sure to post it with the future updates, thanks again.
 
Back
Top Bottom