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

Use a ConcurrentHashMap for deferredDfOpsQueue and deferredDsOpsQueue #114

Open
RKrahl opened this issue Jan 6, 2021 · 0 comments
Open
Labels
enhancement New feature or request performance Issues related to poor performance of the program
Milestone

Comments

@RKrahl
Copy link
Member

RKrahl commented Jan 6, 2021

The deferred operations in the FiniteStateMachine are stored in a HashMap deferredDfOpsQueue or deferredDsOpsQueue respectively depending of storageUnit. In order to maintain thread safety, access to these objects are synchronized, which essentially creates a global lock each time the queue is processed in the FiniteStateMachine. This has been observed to degrade performance in situations where the queue becomes large.

Using a ConcurrentHashMap instead would avoid the need for a synchronized access and might mitigate the degradation.

This proposal has been made by @stuartpullinger in the march 2020 F2F meeting.

@RKrahl RKrahl added the enhancement New feature or request label Jan 6, 2021
@RKrahl RKrahl added this to the 2.0.0 milestone Jan 6, 2021
@RKrahl RKrahl added the performance Issues related to poor performance of the program label Mar 15, 2021
@RKrahl RKrahl modified the milestones: 2.0.0, 3.0.0 Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance Issues related to poor performance of the program
Projects
None yet
Development

No branches or pull requests

1 participant