x


where is the slowdown?

Hi,

I'm starting with unity and Orthello. I'm instantiating 700 sprite prefabs in order to show them in the background.

At the start of the level, the time that takes to instantiate the sprites is around 0.5 seconds (clocked by myself), but afterwards, there's a delay of 15~20 seconds where unity is doing something I don't know. I'm almost sure it's not stuck in a script of mine.

How can I discover what unity is doing in that 15 seconds delay?

thanks,

more ▼

asked Sep 09 '12 at 11:39 AM

KakCAT gravatar image

KakCAT
16 1 1 5

You could place some Debug.Log(); and see which one slows down. You could use Time.time to see what happens and when, but note that in the same frame all returns same time value. At least placing the print on the top of the functions you will see when printing slows down.

Sep 09 '12 at 12:25 PM fafase

Thanks for your answer,

the problem is that it's not my code (I already logged it), so I don't know where to search.

I think orthello is the cause (I will log it)

Sep 09 '12 at 02:18 PM KakCAT

Ideally you'd have Unity Pro, and could look in the profiler.

Sep 09 '12 at 02:56 PM Eric5h5

yep, it's orthello. It seems it's dying when he's using GameObject.Find in the "Start" function when there are lots of objects. I've removed the lines but it seems to be as slow as before, so it may not be the only cause.

I'll keep digging...

Sep 09 '12 at 02:59 PM KakCAT

things are far from ideal right now ;)

Maybe in the next months if I can ship something decent to earn some $$$ (in fact I'm evaluating unity because of microsoft's XNA fiasco)

Sep 09 '12 at 03:01 PM KakCAT
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3750
x156

asked: Sep 09 '12 at 11:39 AM

Seen: 230 times

Last Updated: Sep 09 '12 at 03:01 PM