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

MDC: Replace internal implementation #83

Merged
merged 6 commits into from
Mar 15, 2024
Merged

MDC: Replace internal implementation #83

merged 6 commits into from
Mar 15, 2024

Conversation

hkupty
Copy link
Owner

@hkupty hkupty commented Mar 15, 2024

Replaces ring-buffer based object pool with a simple TreeMap-based implementation.
This trades off a little bit of memory and performance (maybe) for a much better and simpler to reason
about codebase.

If there's a better map implementation, we can use it through the new StringMap interface.

As a side effect, this ensures the ContextMap behaviour is sane now

fix #82

hkupty added 6 commits March 15, 2024 18:22
TreeMap seems to be relatively lighter than HashMap (very minimally) and
performance is similar.

The reason for dropping the old implementation is to reduce complexity,
so instead of a complex in-house implementation we opt for a simpler
layer that outsources to the TreeMap.

Future iterations can be made by playing around with the `StringMap`
interface.
@hkupty hkupty merged commit 5507fc3 into dev/0.7 Mar 15, 2024
2 checks passed
@hkupty hkupty deleted the mdc-write-safety branch March 15, 2024 18:21
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.

MDC implementation has issues w/ kotlin coroutines
1 participant