[Shader Graph][8.x.x] Minor Caching Improvements to Searcher #60
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.
port from SRP
Purpose of this PR
Why is this PR needed, what hard problem is it solving/fixing?
Backport of #59
Previously, the
Create Node
menu/searcher window regenerated an instance of every node on every load call. This makes minor improvements to the caching of entries to speed up the load of the searcher for the majority of calls.The searcher window will now only generate new entries when changes to properties or keywords are detected, or when the shader graph window is refocused (to account for subgraph changes). Only the first invoke after these changes are detected will lag, and every call after that will use a cache and load much faster.
More improvements can be made later as well but this speeds up 80% of the use of the searcher and is probably worth putting in for UX improvements.
Issue link: public internal
Testing status
Manual Tests: What did you do?
Automated Tests: What did you setup? (Add a screenshot or the reference image of the test please)
Yamato: (Select your branch):
https://yamato.prd.cds.internal.unity3d.com/jobs/78-ScriptableRenderPipeline
Any test projects to go with this to help reviewers?
Comments to reviewers
Notes for the reviewers you have assigned.