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

System: skip unnecessary fxo initializations #10838

Merged
merged 1 commit into from Sep 17, 2021
Merged

Conversation

Megamouse
Copy link
Contributor

@Megamouse Megamouse commented Sep 7, 2021

The progress_dialog and patch system aren't needed unless a game is started.

Before, the progress_dialog was initialized everytime we added a single game to the game list or even when we simply started RPCS3. This means that a thread was needlessly idling all the time.

The patch.yml was also read every time when we didn't need it, e.g. when changing the user.

@Megamouse Megamouse added Loader Involving the load of PS3 file formats Optimization Optimizes existing code labels Sep 7, 2021
@Megamouse Megamouse marked this pull request as draft September 8, 2021 00:36
@Megamouse Megamouse marked this pull request as ready for review September 9, 2021 21:07
@Megamouse Megamouse added the RSX label Sep 9, 2021
@Megamouse

This comment has been minimized.

@Megamouse Megamouse changed the title System: only init fxo objects if a game is started System: skip unnecessary fxo initializations Sep 9, 2021
@elad335

This comment has been minimized.

@Megamouse
Copy link
Contributor Author

removed the RSX part


// Load patches from different locations
g_fxo->get<patch_engine>().append_global_patches();
g_fxo->get<patch_engine>().append_title_patches(m_title_id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these functions can be inserted inside the constructor.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They can, but I think it's not worth the trouble in case someone accidentally uses it non-statically

The progress_dialog and patch system aren't needed unless a game is started.
Before, they were both initialized everytime we added a single game to the game list or even when simply started RPCS3.
This both means that a thread was needlessly idling all the time and even worse: The patch.yml was read countless times when we didn't need it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Loader Involving the load of PS3 file formats Optimization Optimizes existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants