Editor Lagging with multiple entities

Hello,

I’m using the Uranus SDK design my level and I have numerous entities on my project and the editor keeps on lagging when deleting entities or duplicating them, is it my browser or my internet?

Browser: Chrome
Internet Speed: 5mbps

Thanks

Probably browser/Editor related.

How many entites are we talking about here? Each scene has a hard file size limit for the JSON being created. I think it’s 11.6 MB

most likely I have around 1000 or so entities it’s mostly grass though, when I tried to clear all instances for the grass, my browser became unresponsive.

Right now I’m manually removing the entities slowly because I can’t delete directly through the parent entity because it’ll cause the unresponsive respond from the browser.

How many levels of hierarchy is the grass under?

its like
Root
-Camera
-Light
-Terrain
-Player
-Paint
-----Grass 1
----------Grass
----------Grass
etc.

Hi @chris_xigega,

Deleting 1000 entities from the same parent entity can take time since each deletion is a separate DB call. If you are adding grass / large numbers of entities, you better use the streaming file option available in that SDK.

You can check how grass is being handled in the Pirron Island Forest demo that is publicly available.

2 Likes

do I have to create a empty json file then put it in the streaming file option? then it’ll just automatically populate the json?

Yes, exactly and you need in addition to add a Playcanvas Rest API token so the script can write to the JSON file. You can get that token from your Playcanvas account page.

image

1 Like

found it, thank you very much

1 Like