-
Notifications
You must be signed in to change notification settings - Fork 85
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
Fast UI testing Hot swapping #718
Comments
Are you doing complete rebuild each time (including sub modules)? What shortcut are you using to compile? |
Game detects plugin(mod) change using file system watcher then plugin (mod) has to be replaced by
For me it's <8-10 sec (full solution rebuild (with cleanup)). Not so bad, I think. |
@krzychu124 for me takes 10 seconds to build project without clean. EDIT: After game is loaded it takes 25 sec first time. 10 sec if I build right after. |
Its also possible to enable TMPE in asset editor. its much less heavy that way. My Hide TMPE mod does nothing in the assert editor in release build but hides all crossings in asset editor in debug build. saved me a lot of time :) |
Its crazy! Now that It reloads only once its much faster :) 12 sec reload time |
I think you included the fix as part of the mass edit PR? #631 (review) If so it would be better as a separate PR so it's distinct from other tasks and we can get it merged in quick and it's easier to refer to in change notes. |
hot reload mini-boost: boosts #718 prevent double hot reload. Hot reload time is 12 sec. prevent disabling tool after hot reload. prevent unintentional disabling of other tools.
@kianzarrin This might be interesting approach: #136 (comment) |
I tried excluding Custom AI to increase build speed but other files directly or indirectly require CustomPathManager. I managed to exclude about 10 files without build errors but that did not improved build speed. I also tried skipping detours but overlay would not work. To my disbelief it would work only if I performed in game hot swap. In any case It did not boost speed as much as I hoped. it reduced reloading time from 12s to 5s which is not bad but is it worth creating a new build config. Having a new UI only build config might be good as in future we can gradually improve it to make it faster. but I don't think its going to happen as we have bigger fish to fry. If I could surround all the code that is related to the CustomAI with #if !UIONLYBUILD ... #endif it might improve build/ reload speed a lot. The downside is that future code development would be difficult as we should always test if we don't break UIOnly build. |
I |
The speed increase will partly be due to not having to recreate all their settings screens. Could you make a small mod that controls when So far I've identified these situations in which settings UI is updated:
Could save a ton of time and would make any activities in Content Manager > Mods much faster. |
Better still, create settings screen on-demand. :) EDIT: Acutally, don't do that as lots of mods use |
I have plans for a hot reload mod but I I have postponed that to later (maybe a month later) because I like to work on some of the works I have started. I Don't mind if anyone else does it. |
I have already addressed this in Load Order mod. |
Situation
When I want to design a UI feature (or modify an existing one) I like to play with it a lot and see how it looks in game. Every time I build TMPE it takes a long wile. The game also takes its sweet time to hot swap it. This severely slows me down.
Need
I need a fast - doesn't have to be functional - way to check how does my UI code modification look.
I have created small mods that I can test stuff with but I can only go so far with them without access to internal TMPE functions.
This might overlap with the concept of TMPE light ( light from user point of view ) but the objective here is to reduce loading time not to increase run time performance.
Action
most of the reload time is lost to Harmony patching. I don't know how much of build time is due to harmony.
I suggest to have a UI only build of TMPE that does not use Harmony patches. That should reduce hot swap to a fraction of a second.
I don't know how to reduce build time though. I am tempted to use dnSpy to modify TMPE DLL ... lol!
Plan
we are doing a lot of UI stuff recently so this could be very handy to us.
The text was updated successfully, but these errors were encountered: