Burndown performance overhaul#4136
Open
ashprice wants to merge 3 commits into
Open
Conversation
Signed-off-by: ashprice <gitcommit1@sl.ashprice.co.uk>
Signed-off-by: ashprice <gitcommit1@sl.ashprice.co.uk> Derp. Signed-off-by: ashprice <gitcommit1@sl.ashprice.co.uk> clang-format thinks clang-format knows best. it does not. Signed-off-by: ashprice <gitcommit1@sl.ashprice.co.uk> comment clean up Signed-off-by: ashprice <gitcommit1@sl.ashprice.co.uk>
Signed-off-by: ashprice <gitcommit1@sl.ashprice.co.uk> Typo. Signed-off-by: ashprice <gitcommit1@sl.ashprice.co.uk>
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.
Closes #3412 (planned PRs will likely help as well.)
Overview of changes
I have tried to make the code as self-documenting as possible with comments. This said, here is a tldr:
scan()function used loops that checkedwhile (from < now)on every period between a task's entry date and the present, which is slow. Now we pre-quantize tasks into epochs, and then use a map to look them up instead of scanning.libfaketime. No more gaps if you just so happen to be using TW at 1:30AM on 2 days of the year.now- ie. the hours, minutes, and seconds since midnight also count.finalize()function.There are quite a lot of changes here, so please ask questions if anything is unclear. My first attempt at this caused a lot of regressions, as far as I can tell the report is equivalent in functionality now and is lacking in bugs. The only difference from the previous report on the user-side is that the fix rate can be rounded slightly differently, leading to a single decimal point difference.