protobuf-unity icon indicating copy to clipboard operation
protobuf-unity copied to clipboard

Long Unity startup times due to protobuf

Open akoolenbourke opened this issue 3 years ago • 1 comments

We've been getting very long Unity startup times and I enabled profiling in the editor startup and we saw this.

image

Sometimes if we delete Library and obj folders we get it starting quickly again but it always comes back at some point.

Any ideas on this and how we can get around it?

akoolenbourke avatar Apr 07 '21 11:04 akoolenbourke

I actually got annoyed enough to take a look and I see it's the post processing function's use of IncludePaths and AllProtoFiles. For every asset imported it goes through every file looking for protos, making parent folders to use as includes etc. Moving the calls to IncludePaths out of the loop, into a variable seems to make a world of difference.

akoolenbourke avatar Apr 07 '21 11:04 akoolenbourke