Cannot Fix

Embeds take longer to instantiate than macros

Personuo 3 years ago updated by Lazlo Bonin (Lead Developer) 3 years ago 2

.I Convert Macro, And Found that instantiate this prefab takes more time.

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

2175ms is a bit exaggerated for a new project.But my project has more than 100 object with bolt. 

if in a new project.It takes about 3 times.

for example. use Macro 5ms,and use Convert Macro 16ms

Cannot Fix

Hi Persuono,

Embed graphs suffer from this performance problem. The reason is that they have to be copied every time they are instantiated, because they live on their parent machine. Macros don't need to be copied, because they live in an asset. They are therefore always faster to instantiate.

The only thing we can do to speed this up is change Bolt's underlying serialization engine (FullSerializer) to one that is more performant (Odin Serializer). This is currently in the works for Bolt 2. However, we are also planning to softly obsolete root embed graphs in Bolt 2, namely for this performance reason.