-
Notifications
You must be signed in to change notification settings - Fork 6
#585 phase 1 #623
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
#585 phase 1 #623
Conversation
no diff from 37bf598 (child of 3282921)
userlogsHere are links to charts of how the last three performance improvements played out.
|
graph generationThis isn't new, but it should be noted that the .sql file is written in the background during the graph generation process.
I'd link to the images directly, but it looks like GitHub is adding some browser session-specific tokens to the URL. |
alternate universeOriginally, this commit was done as a child of 3282921, but I decided to have a little fun with a merge commit. What if
|
|
Ready to rock! |
|
Going to try it out now, thanks. |
|
Under 30 seconds for a site update (minus DB loading) on my MBP. |
|
I'm curious to know how long it took before. |
|
Hmmm.. Production site update went from 66 seconds to 112. Graph generation specifically went from about 45 seconds to about 95. |
|
Odd. Could disk write access be the bottleneck? Around the time of my last post, I noticed slow graph writes on bsdlab, which has an SSD. A few years back, I noticed widely varying results when benchmarking tasks that did a lot of writing to disk.
|
I see that you've removed the function but don't get how you log now. Can you point me to the "new" function (call)? |
|
@yakra + @jteresco Something went wrong. Both production servers indicate 0 miles for all users now https://forum.travelmapping.net/index.php?topic=6238.msg34610#msg34610 |
|
*puts fingers to keyboard to respond to previous post* ...Crap. How the... |
|
Anyway.
As before, I'm using the overloaded std::ostream::operator <<. The changes in the code are too numerous to mention, but here's one example from userlogs: Before: After: |
yakra@BiggaTomato:~/ytm/DataProcessing/siteupdate/cplusplus$ diff \
<(tail -n +12258954 _3282/TravelMapping.sql | head -n 3) \
<(tail -n +12258954 _spr1/TravelMapping.sql | head -n 3) \
# overallMileageByRegion table
1,3c1,3
< ('AB','9235.1470421475879','18472.872821377736')
< ,('ABW','45.461910136369539','45.461910136369539')
< ,('AFG','2493.3650900241528','2493.3650900241528')
---
> ('AB','0x1.20992d246ef83p+13','0x1.20a37dc4e3228p+14')
> ,('ABW','0x1.6bb1fdf10b2f4p+5','0x1.6bb1fdf10b2f4p+5')
> ,('AFG','0x1.37abaed1463aap+11','0x1.37abaed1463aap+11')I use a custom program to diff the .SQL files, which apparently reads & interprets those hex values just fine, and converts them to a number internally. Let's |
|
Probably wanna nix |
|
@yakra no urgency on this since it was easy enough to jump back to a previous point. I'll try some things out with the file writes some time soon, don't hesitate to remind me if I don't get at it soon. |
|
I know exactly what to do. I'll have a pull request later today. |


















Closes #518!
The performance-killing
sprintffunction has been removed from user log, DB file, and graph generation routines.More to come in the future; I've yet to work on NMPs and stats CSVs.
@jteresco, I recommend a compile & test drive of this, if for no other reason than to see how blazingly fast graph generation is now. 😀
I am curious to see though, how fast
--errorcheckis with the userlog speedups.One minor change: the
waypointstable in the DB has done away with what I call "Python style floats", where a trailing.0is written after an integral value.42.0->42.This could in theory happen in other tables too; it's just in
waypointswhere we see it in practice. I don't expect it'll cause any problems.We're nearing the end of the road for big graph generation improvements.
Percentagewise, this beats any of the first big five pull requests from 2019. And it wasn't even something I had planned.
While I still have a few ideas left, there probably won't be anything else of this magnitude. Just smaller incremental changes, much lower impact.
I do expect to get lab2 to more consistently break the 1-second barrier, until the ever-increasing size of the HighwayData repo takes that possibility (using the most recent commit) away permanently.