Skip to content

Conversation

@tmadlener
Copy link
Member

BEGINRELEASENOTES

  • Check the commands for the KeepDropSwitch in the constructor instead of re-parsing them every time isOn is called.
  • Move the KeepDropSwitch into the k4FWCore namespace and deprecate the unnamespaced usage.
  • Make the IOSvc fail in initialize in case the outputCommands are invalid
  • Add unittests for KeepDropSwitch

ENDRELEASENOTES

Not sure if the deprecation of the global namespace definition of KeepDropSwitch is necessary or if we can simply remove the deprecated definition immediately.

Fixes #348

@tmadlener tmadlener force-pushed the keepdropswitch-tests branch 3 times, most recently from 20b73e4 to d057f2b Compare October 23, 2025 07:13
@tmadlener
Copy link
Member Author

A quick benchmark shows that the interesting use case of constructing the KeepDropSwitch and running isOn on a number of collections once that this is now twice as fast for the default case of "keep *", and that runtime is roughly stable with multiple output commands, whereas the existing implementation exhibits some visible scaling behavior in the number of commands.

It is not the most performance sensitive piece in the whole chain, but I think it is still nice to see that the pre-processing we do in the constructor pays off for the overall runtime.

@jmcarcell
Copy link
Member

Yes, I don't think any difference will be noticeable, at least I never saw it in profiles. I think the unnamespaced one can be removed, I don't think it is used anywhere else.

@tmadlener tmadlener force-pushed the keepdropswitch-tests branch 2 times, most recently from ac29a36 to 414cedf Compare October 27, 2025 15:20
@tmadlener tmadlener force-pushed the keepdropswitch-tests branch from 414cedf to 8b731ea Compare October 28, 2025 09:47
@jmcarcell
Copy link
Member

I'm not sure for how long Gaudi will be buildable with GCC 11 since it has been a while they only test with GCC 13 and above.

@jmcarcell jmcarcell merged commit d89b011 into key4hep:main Oct 30, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KeepDropSwitch crashes badly on malformed command strings

2 participants