Search Issue Tracker
Duplicate
Votes
0
Found in
5.3.3p2
Issue ID
778662
Regression
No
Unnecessary GC pressure in editor when querying for a component that does not exist
Using this.gameObject.GetComponent<>(); uses much more memory if you are searching for the component that does not exist on that specific game object in the editor. In windows build and (as user reported) in android build this issue does not occur.
Steps to reproduce:
1. Open attached project's scene "TEST".
2. Enter play mode.
3. Open the profiler.
4. Click on "CAMERA" button few times.
5. Some little spikes are seen in profiler under Memory (GC Allocated - 0.9KB used).
6. Click on "LIGHT" button.
7. Huge spikes occur (GC Allocated - 5.7 MB)
This does not reproduce on android or windows builds. But does reproduce in both OSX and Windows 10 editors.
Reproduced on Windows 10 with 5.1.0f3, 5.3.3p3 and 5.4.0b10
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Inconsistent logic on when 'open VFX graph Samples' button appears on Visual Effect Graph in Package Manager
- Unable to dock tabs on panels when non-standard pointers are used (touch-screen, tablet and pen)
- Editor hangs when rendering TMP Text Component with Left and Right Margins set in the Extra Settings
- Occlusion's fields can be set to negative numbers
- Issues with tutorial content in Universal 3D sample
This is a duplicate of issue #590565