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

Improve CarDecoder.DecodeCar(byte[]) performance #157

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

alnkesq
Copy link
Contributor

@alnkesq alnkesq commented Jan 12, 2025

Reading a 3.71 MB CAR file (including ATObject parsing), 10x times, net9.0 Release

Original implementation
01:20.61

This PR
00:02.43

@drasticactions
Copy link
Owner

drasticactions commented Jan 13, 2025

What repo are you reading? I've been unable to replicate that benchmark against my repo nor any of my bots I have (With the code as it existed).

That said, the code is fine and I'm using span elsewhere, this should match it.

e. Not saying the original was good, just that it took minutes, not hours.

@drasticactions drasticactions merged commit 6cd41de into drasticactions:develop Jan 13, 2025
6 checks passed
@alnkesq
Copy link
Contributor Author

alnkesq commented Jan 13, 2025

Those are dots, not colons.
It's 1 minute vs 2 seconds, not 1 hour vs 2 minutes.

@drasticactions
Copy link
Owner

drasticactions commented Jan 13, 2025

I understood that, but it's a lot! lol. Strike that, I did think hours, it was early, what I can I say.

For my repos it was always within seconds, but the CAR files I've used are all less than a megabyte (Mine is 512 kb). If you can share which repo you used that's that big, I can write tests for it to make sure it doesn't regress in the future.

e. Never mind. Turns out downloading any of the top posters repo will get you much larger repos than I have seen. Yeah, I got plenty to work with now.

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.

2 participants