Why does Creating a New Instance have such an Overhead?

Observations from leading GP activities

Moderator: MSandro

Post Reply
User avatar
Calloway
Posts: 68
Joined: Apr 30th, '18, 00:28
Location: Eastern United States

Why does Creating a New Instance have such an Overhead?

Post by Calloway » Jul 23rd, '18, 03:12

Why does creating new instances create a big overhead, especially on older computers and laptops?

It's also very apparent in lower cored systems like dual core and in laptops with low clock speeds.

JohnM
Posts: 367
Joined: Sep 11th, '15, 14:42

Re: Why does Creating a New Instance have such an Overhead?

Post by JohnM » Sep 1st, '18, 17:12

I suspect what your'e seeing may be the result of displaying a thumbnail for the new instance, rather than creating the instance itself. It's also slow to add an instance to the stage.

One way to address the thumbnail slowdown is to select a different class before running the code the generates new instances. For example, in the "Rabbits and Grass" example, things run faster if you select the "Rabbit" class instead of the "Grass" class.

Post Reply