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

SceneAlgo : Fix history() performance regression #5996

Merged
merged 4 commits into from
Aug 13, 2024

Conversation

johnhaddon
Copy link
Member

Replacement for #5995, this time with the right permissions to build GafferArnold.

@johnhaddon johnhaddon changed the base branch from main to 1.4_maintenance August 8, 2024 14:04
This test takes the best part of 10 seconds per run, and models problems we saw in two separate production environments (not using Loops there, but just a series of manually made diamond connections).
This gives us the following pleasing performance improvement :

```
testHistoryDiamondPerformance (GafferSceneTest.SceneAlgoTest.SceneAlgoTest) : was 9.11s now 0.00s (100% reduction)
```

As noted in the comment, this does mean that we're now returning a reduced history, but we don't anticipate this being a problem in practice. Clients such as `attributeHistory()` aim to whittle the graph down to a single path relevant to a particular attribute, and our HistoryWindow only shows a single linear history anyway. The histories we're returning now are a closer match for the ones we returned prior to #4568, while retaining the main benefit of that PR - the evaluations of thing we're not trying to track are still pulled from the cache if possible.

Fixes #5199
@johnhaddon
Copy link
Member Author

Ready for review.

@johnhaddon johnhaddon self-assigned this Aug 9, 2024
@danieldresser-ie
Copy link
Contributor

These changes all look good me.

Murray also asked me to evaluate the possible risks from doing a 1.4 release including this ... that I feel a bit less qualified to say. John's comment is "this does mean that we're now returning a reduced history, but we don't anticipate this being a problem in practice", which seems accurate to me. I also don't entirely understand the impact of the fix to ValuePlug where it was previously passing the wrong plug to forceMonitoring.

Overall, it definitely seems like an improvement, and it seems highly unlikely that anyone is going to notice any changed behaviour other than the speedup, but hard to guarantee that no one will notice the change.

@murraystevenson murraystevenson merged commit 993ab44 into 1.4_maintenance Aug 13, 2024
6 checks passed
@johnhaddon johnhaddon deleted the historyRegressionFix branch September 2, 2024 11:57
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.

3 participants