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

refactor: remove callbacks from metadata parser #1444

Closed
wants to merge 2 commits into from

Conversation

mShan0
Copy link
Contributor

@mShan0 mShan0 commented Jun 10, 2022

Just an idea, converts callbacks to async/await for the column metadata parser-related classes. Would need to do more work to make all of the other tests pass if we want to continue with this approach.

@arthurschreiber
Copy link
Collaborator

@mShan0 Thanks for opening this PR!

While this makes the code a lot easier to read and understand, performance might become a problem here. Each call to await requires to go through at least one iteration of the event loop. When parsing a packet, this can easily add up to thousands of iterations through the event loop and a severe degradation of the data parsing performance.

I think eventually, we will have to bite the bullet and refactor all of the parsing code to be based on something that neither uses promises nor callbacks. I'll try to come up with an example that should allow you to take over and apply it to all of the parsing code.

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.

None yet

2 participants