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

CMCL-1397: Use TypeCache where appropriate #977

Merged
merged 1 commit into from
May 6, 2024
Merged

Conversation

glabute
Copy link
Collaborator

@glabute glabute commented Apr 25, 2024

Purpose of this PR

TypeCache is an optimization when iterating type using reflection. Using TypeCache to search for types speeds up domain reload time.

Testing status

  • Added an automated test
  • Passed all automated tests
  • Manually tested

@glabute glabute requested a review from AntoineCharton April 25, 2024 13:15
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 22.58065% with 24 lines in your changes are missing coverage. Please review.

Project coverage is 26.95%. Comparing base (ab0f4f1) to head (26f767d).

Files Patch % Lines
...tor/Obsolete/CinemachineVirtualCameraBaseEditor.cs 0.00% 4 Missing ⚠️
...machine/Editor/Utility/CmCameraInspectorUtility.cs 0.00% 4 Missing ⚠️
...ditor/Editors/CinemachineFreeLookModifierEditor.cs 0.00% 2 Missing ⚠️
...ity.cinemachine/Editor/Obsolete/VcamStageEditor.cs 0.00% 2 Missing ⚠️
...tor/PropertyDrawers/EmbeddedAssetPropertyDrawer.cs 0.00% 2 Missing ⚠️
...r/PropertyDrawers/SplineAutoDollyPropertyDrawer.cs 0.00% 2 Missing ⚠️
...tor/Utility/CmPipelineComponentInspectorUtility.cs 0.00% 2 Missing ⚠️
...chine/Editor/Utility/EmbeddedAssetEditorUtility.cs 0.00% 2 Missing ⚠️
...ity.cinemachine/Editor/Utility/InspectorUtility.cs 0.00% 2 Missing ⚠️
...y.cinemachine/Tests/Editor/UpgradeCm2ToCm3Tests.cs 0.00% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #977      +/-   ##
==========================================
- Coverage   27.03%   26.95%   -0.08%     
==========================================
  Files         248      248              
  Lines       27870    27826      -44     
==========================================
- Hits         7535     7501      -34     
+ Misses      20335    20325      -10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@AntoineCharton AntoineCharton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have much knowledge of reflection. My review is mostly based on manual testing and I didn't find any issue.
Improving assembly reload time is soooo important for our users with big projects and I am glad Cinemachine is doing it's part! Love this PR!

@glabute glabute merged commit aa0116e into main May 6, 2024
7 of 9 checks passed
@glabute glabute deleted the dev/use-type-cache branch May 6, 2024 11:34
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