Comments (1)
Hello!
The overhead of the Update calls by themselves is miniscule compared to most other things that are easier to fix. I suggest using a profiler first and either tackling high run time methods, or high garbage producer methods (first for more FPS, second for less stutter). We've spent a lot of time optimizing KK and most of the CPU time was spent in game code or in particularly bad methods in some plugins (which we fixed).
CharaCustomFunctionController inherits from MonoBehavior and itself uses some of the event methods. If you want to disable it then make sure to test your code because it might cause additional events to be fired (OnEnabled) or some events to be missed (coordinate change) which could make things worse not better. I have plans on a more efficient API but the overhead is too small to make it worthwhile even in KK where there are hundreds of these objects being spawned in a generously modded game.
I use the enable trick myself in some plugins, but I tend to avoid it unless I use it with OnGui code because only in that case it brings a tangible benefit, while making the code harder to read and maintain (which is a major consideration since many of these plugins span 4 or more games and some had 3+ people over development).
Patching during loading to a H scene is a good idea to lower boot time (it's more important with loading resources though), but unpatching is a waste of time since the H scene methods are only going to be fired inside said H scene. In case of plugins that only work inside H scenes it's better to either spawn a new monobehavior with the functionality and let it be destroyed by the scene unloading, or hook one of the H scene class' update methods and run your code in that.
If you have a working KKS version of this plugin then by all means make a PR for it, I really don't get enough of these :(
If you want to discuss more about what and why in these plugin sources, I suggest talking in the mod-programming channel on the Koikatsu discord server.
from illusion_bettercolorpicker.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from illusion_bettercolorpicker.