Search found 3 matches

by osteon1992
Fri Sep 17, 2021 8:33 am
Forum: General Discussion
Topic: Possible to object pool to load gameobjects
Replies: 5
Views: 1249

Re: Possible to object pool to load gameobjects

Yes I read that. I replaced the StringBuilder with ZString from https://github.com/Cysharp/ZString. Also I commented out the ES3Debug.Log since it was generating GC from string concat for every read. This is from ES3JsonReader ReadPropertyName. Results are attached below, pretty good. Will ES3Debug ...
by osteon1992
Thu Sep 16, 2021 9:08 pm
Forum: General Discussion
Topic: Possible to object pool to load gameobjects
Replies: 5
Views: 1249

Re: Possible to object pool to load gameobjects

According to the profiler, it happens when I load tries to read the list of objects. It also shows that the reader generates a lot of garbage from strings because it has to read 200+ objects. Is there a way to reduce the GC allocations. According to this article, StringBuilder.ToString() generates g...
by osteon1992
Thu Sep 16, 2021 6:24 pm
Forum: General Discussion
Topic: Possible to object pool to load gameobjects
Replies: 5
Views: 1249

Possible to object pool to load gameobjects

Currently I'm using ES3 to save game objects in the scene upon exiting and loading them when the scene comes back (using ES3.Save<List<GameObject>> and ES3.Load<List<GameObject>>). It works pretty well except that the performance chugs due to instantiating 200+ objects and destroying them. As much a...