-
Notifications
You must be signed in to change notification settings - Fork 112
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
Enable command line argument to produce an archive checksum to the headless/normal engines #1904
base: master
Are you sure you want to change the base?
Conversation
…adless/normal engines
@@ -63,6 +63,16 @@ bool FileSystemInitializer::Initialize() | |||
|
|||
SetupThreadReg(); | |||
|
|||
InitializeTry(); | |||
|
|||
// in case of an exception, ErrorMessageBox takes care of this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't this comment about line 87/97 previously so no longer makes sense after moving?
@@ -144,6 +144,7 @@ DEFINE_string (map, "", "Specify the m | |||
DEFINE_string (menu, "", "Specify a lua menu archive to be used by spring"); | |||
DEFINE_string (name, "", "Set your player name"); | |||
DEFINE_bool (oldmenu, false, "Start the old menu"); | |||
DEFINE_string_EX(calc_checksum, "calc-checksum", "", "Calculate named archive checksum"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've seen something on discord that this doesn't guarantee synchronicity. Maybe it would be good to put this in the description? (I guess this means it does affect archive cache after all)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It runs exact same code as the full engine except without ThreadPool since it's not initialized that early, so it might run slower on SSDs. Generally my note was regarding running several instances of calc-checksum in parallel, which might certainly lead to troubles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. It's not really documented what the real constraints on "normal" parallel engines are though1 and this one otherwise looks like a "const getter" so maybe worth mentioning anyway?
DEFINE_string_EX(calc_checksum, "calc-checksum", "", "Calculate named archive checksum"); | |
DEFINE_string_EX(calc_checksum, "calc-checksum", "", "Calculate named archive checksum and write to cache, cant run in parallel"); |
Footnotes
-
somebody on ZK has a replay parser and he runs it in parallel and it seems to work pretty much fine, so maybe it's only dangerous if you actually modify sensitive files like springsettings or archive cache, which doesn't happen if there weren't new maps/games? ↩
Addresses #1903