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

Introduce CHDLCHookManager to retrieve DLCInfos with specific implemented hooks. #1247

Closed

Conversation

remcoros
Copy link
Contributor

@remcoros remcoros commented Aug 19, 2023

fixes #212

It's still missing proper docs and comments. but this is the idea. I've split up the commits for easier reviewing.

@remcoros
Copy link
Contributor Author

remcoros commented Aug 20, 2023

I found another issue I am undoing now:

There are a few calls to GetDLCInfos(true) (instead of false), to retrieve only the DLCS that are new in the current campaign. For example in XComOnlineEventMgr, it is used to trigger "OnLoadedSavedGame", but only for DLCs that were not in the current campaign's history.

I will undo that change so that it uses the normal GetDLCInfos(true) again.

I suppose it's not really worth optimizing these cases, since they are rarely/used only once?

@remcoros
Copy link
Contributor Author

Another question: I need some guidance on documenting/commenting on these changes.

  • Does CHDLCHookManager need a "HL-Docs: feature:" entry? (Maybe not, because it's only an internal API?)
  • Any other places I should add more comments/issue references?

@robojumper
Copy link
Member

Personally I would go for a documentation page that documents the intent and some implementation details, explicitly stating that:

  1. The Highlander does this performance optimization
  2. Any observable difference compared to calling the hooks in all DLCInfo classes in run order is a bug.

@remcoros
Copy link
Contributor Author

Added some documentation.

Should I do a rebase --interactive to make the history clean again, or will this get squashed into one commit anyway?

@Iridar
Copy link
Contributor

Iridar commented Aug 21, 2023

It's gonna get squashed. The only time we use more than one commit per PR is when an existing base game class is added to source.

@Iridar
Copy link
Contributor

Iridar commented Aug 21, 2023

Also docs fail to build atm in this PR.

@remcoros
Copy link
Contributor Author

It's gonna get squashed. The only time we use more than one commit per PR is when an existing base game class is added to source.

There is one added file. So I'll do a final rebase after this is considered 'done'.

@Iridar
Copy link
Contributor

Iridar commented Aug 21, 2023

There is one added file

But this is not base game source code file, it's entirely new, so it doesn't matter.

@remcoros
Copy link
Contributor Author

There is one added file

But this is not base game source code file, it's entirely new, so it doesn't matter.

XComPresentationLayerBase.uc

this one from base game got added.

@Iridar
Copy link
Contributor

Iridar commented Aug 21, 2023

Ah, I didn't notice. Then yes.

@remcoros remcoros marked this pull request as ready for review August 21, 2023 13:55
@remcoros
Copy link
Contributor Author

added docs, rebased, and ready for review.

@Iridar Iridar added ready-to-review A pull request is ready to be reviewed performance labels Aug 21, 2023
@Iridar Iridar added this to the 1.27.0 milestone Aug 21, 2023
@BlackDog86 BlackDog86 assigned BlackDog86 and remcoros and unassigned BlackDog86 Aug 3, 2024
@Iridar
Copy link
Contributor

Iridar commented Sep 5, 2024

Implemented in #1385

@Iridar Iridar closed this Sep 5, 2024
@Iridar Iridar removed this from the 1.29.0 milestone Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance ready-to-review A pull request is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve performance on DLC Hooks (X2DownloadableContentInfo)
10 participants