eic / EICrecon

EIC Reconstruction - JANA based
https://eic.github.io/EICrecon
GNU Lesser General Public License v3.0
6 stars 27 forks source link

WIP: Modified JEventProcessorPODIO::Process to acquire lock only when need… #1531

Open RaiqaRasool opened 1 month ago

RaiqaRasool commented 1 month ago

Briefly, what does this PR introduce?

This PR introduces changes to the JEventProcessorPODIO::Process to limit the scope of locks, enabling the use of JANA's parallelism and improving the performance by avoiding unnecessary serialization of events.

What kind of change does this PR introduce?

Does this PR introduce breaking changes? What changes might users need to make to their code?

No, this PR does not introduce breaking changes. Users do not need to make any changes to their existing code.

Does this PR change default behavior?

Yes, the PR changes the default behavior by enabling JANA's parallelism through the use of std::unique_lock with std::defer_lock, allowing sections of the code to run in parallel rather than in sequence. The main change is the introduction of std::unique_lock with std::defer_lock to manage the mutex locking more precisely, allowing for better parallelism by unlocking the mutex during non-critical sections of the code.

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

sonarcloud[bot] commented 1 month ago

Please retry analysis of this Pull-Request directly on SonarCloud

nathanwbrei commented 1 month ago

Was that all that was needed? In transit but I thought it wasn't that easy...

The goal is to find out. I'm also resuscitating #1069 as part of this effort.