perf: Logical replication perf experiments #667
+77
−29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
changes
msgspec
as package dependency and setsMsgSpecWriter
as tap's message writer classcontext
Diving deeper into the code wrt issue #587
These changes may or may not be of interest for merging; they're mostly just a demonstration of what I found.
details
All together, these changes reduced runtimes for my example E+L pipeline from ~112s to ~107s. Not very impressive, I know. Here's the
py-spy
flame graph based on this repo's main branch:And here's the (very similar) equivalent based on the latest version of my branch:
My changes only touch a small part of the tap's call stack:
Unfortunately, I wasn't able to do anything about the slowest parts of the tap:
For what it's worth, here is the corresponding functionality in the pipelinewise variant's code. There's a lot of additional logic there, but I had a hard time understanding the key differences with this variant.
questions
msgspec
?