-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: add performance investigation #12
feat: add performance investigation #12
Conversation
Made a small change to make adding more benchmarks easier. The one you added works great and definitely shows that the performance bottleneck is in the HTTP calls. I was thinking of adding a benchmark that just runs the code once for the downloads, that should be representative enough for me. (could you work on that?) I would be interested in getting a call heatmap for that. I was looking into pprof-rs but I keep getting compilation errors whenever I try to add it, wondering if you could get it to work somehow. Also let me know if you are participating in hacktober because in that case I'll merge this in a few days :) |
Ok so after digging into it for a little bit, it seems that the library is currently not officially supported on windows. Found this issue and this MR but it's not fully implemented yet, unfortunately. |
Yeah, for sure, I'll dig more into the docs later and try to do this.
Yes, I am. Also, this project looks good btw, I'll try to contribute to it whenever possible. |
Another thing that might be useful is to be able to view download times per link (in case one specific website is disproportionately slow for some reason, it would be nice to know). Not sure how this would work with a proper benchmark lib (we could also just manually time the downloads) but just throwing ideas out there 👍 I basically want to have a good enough idea of what hinders performance before I decide whether I want async or not |
I was searching about setting a lower number of samples for Criterion benchmarks (to bench the here's the documentation about this running the bench with 10 samples resulted in this:
what do you think? |
So the We could increase the measurement time with this function but I'm not sure if there's a reason to do that since that will always depend on a lot of external factors. I think this is basically what I wanted! Could you push your work so I could take a look? |
Converting this to a draft so I don't click the big green "Merge" button accidentally |
I fixed some linting warnings I was getting after the introduction of |
From the hacktober website |
Oh no 😅, ok I'll do it. Thanks again man, if you find any other issue someday, feel free to contact me |
@ddanielsantos waiting for the MR again 👀 |
done 🫡 |
closes #8
details
Implemented a benchmark for the
map_to_html
function, to do it, i moved the content fromsrc/util.rs
tosrc/lib.rs
(see library crate)I also tried to add a benchmark the
download_blogs
function, but the 100 iterations would take a lot of time:I can reduce the iterations or try to figure out another solution, what do you think fits better?