FlaxEngine / FlaxAPI

Old repository with C# Editor and C# API for creating games in Flax Engine

Home Page:https://flaxengine.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding item to list that is serialized in inspector result in low FPS

Muchaszewski opened this issue · comments

Issue description:

If an object have list that is serializable and can be displayed in the Properties window, and this window is visible (list can be retracted) high CPU spikes are produced under GUI.OnUpdate self. The more elements the higher impact.
image
The expected result would be to NOT serialize lists displayed in Properties unless they are expanded.

Steps to reproduce:
Create empty actor, attach this script. Select this actor on scene

    public class Foo : Script
    {
        public List<string> List = new List<string>();
        private void Update()
        {
            List.Add("RANDOM ITEM CONTENT");
        }
    }

NOTE: Impact is higher if object in list is more complex. For this example i have 20ms per frame of serialization time (even with 1 item in it)

Flax version:

0.3.6176