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

Compatibility checks should be skipped during hot reload #727

Open
originalfoo opened this issue Feb 22, 2020 · 3 comments · May be fixed by #699
Open

Compatibility checks should be skipped during hot reload #727

originalfoo opened this issue Feb 22, 2020 · 3 comments · May be fixed by #699
Assignees
Labels
code cleanup Refactor code, remove old code, improve maintainability performance Make it faster! technical Tasks that need to be performed in order to improve quality and maintainability
Milestone

Comments

@originalfoo
Copy link
Member

While they don't take much time, compatibility checks should still be completely skipped during hot reload. This can likely be achieved through active scene checking.

Ideally compatibilty classes should be changed from static to instance-based (see also: #211), and completely bypass firing up the instances.

@kianzarrin Any comments on detecting in-game hotload?

@originalfoo originalfoo added technical Tasks that need to be performed in order to improve quality and maintainability code cleanup Refactor code, remove old code, improve maintainability performance Make it faster! labels Feb 22, 2020
@originalfoo originalfoo added this to the 11.1.1 milestone Feb 22, 2020
@originalfoo originalfoo self-assigned this Feb 22, 2020
@originalfoo originalfoo linked a pull request Feb 22, 2020 that will close this issue
31 tasks
@kianzarrin
Copy link
Collaborator

Any comments on detecting in-game hotload?

There are several ways of checking whether we are in game or not each of them with minor differences. Those minor differences don't matter as far as checking for incompatible mods are concerned. So both of these methods work:

  1. One way as you said is to check the scene.
  2. Another way is to check LoadingExtension.InGame (which checks app mode)

I suspect 99% of the hot-reload time is spent on Harmony.

@originalfoo
Copy link
Member Author

originalfoo commented Feb 23, 2020

Yup. I've decided to keep static methods and stuff for now as it's just so much simpler than managing instance lifecycle. But the compatibility checks will now be skipped if a hot-reload occurs in-game.

EDIT: If nothing else it will reduce stuff going in to log file which should make finding any debug trace a little bit quicker.

@originalfoo
Copy link
Member Author

Debug 827.3824706: CompatibilityManager.Activate() Scene = Game
Debug 827.3830747: - Skipping due to in-game hot reload

@originalfoo originalfoo modified the milestones: 11.1.1, 11.2 Feb 26, 2020
@originalfoo originalfoo modified the milestones: 11.2, 11.3 Mar 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code cleanup Refactor code, remove old code, improve maintainability performance Make it faster! technical Tasks that need to be performed in order to improve quality and maintainability
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants