Performance fix for non-static streaming data#728
Merged
gittiver merged 4 commits intoCrowCpp:masterfrom Jan 1, 2024
Merged
Conversation
… for std::min not being defined as std::min(a,b) under c++11, CROW_MIN
gittiver
approved these changes
Jan 1, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I am using your project at work for controlling a high performance fpga project. Sometimes i want to peek into the data, and get a bunch of bytes from the device. This may vary from some several kilobytes to megabytes, depending on how much data i need.
I noticed that when i start pulling 20Megs or more the response is terribly slow (this is when it comes into Crow's streaming-handling). So i took a look. I believe using substr there is not so good, because of all the alloc/dealloc.
You can verify, use the code below:
I write to /tmp/testcmp to verify the checksums with the data i get via curl:
/usr/bin/time -f "+%E" curl http://localhost:18080/ > /tmp/testWith current Crow the transfer takes several seconds. With this patch it takes some milliseconds.
Thank you for the amazing work on Crow. I really like it (especially the json stuff).
Kind regards,
jfm