Jump to content

Transformation cause update lag


photo

Recommended Posts

Posted

Hello

Scene with 4 simple objects but different transformations, only at some camera angles cause ~3000ms delay in update()

can't provide lag reproducing code

is there something about matrices I should know and can cause such lags?

Unigine.Console.get().run("world_save laggy_world"); don't save camera transformation (and runs smoothly in editor)

Visual Studio Profiler says most time spend in Unigine.App::update() (have no code in scripts)

what can be done to find out lag source?

thanks

laggy_world.world5ad4a7775d851_(1).thumb.png.940566dd8e58ac9da269c7e2ada1ee96.png

Posted

If your logic is based only on UnigineScript you can try to run world_analyze console command in debug build. Otherwise (without any reproduction code) it will be really hard to find out what really happens here.

I can see that allocation number is very large (4800), that's probably causing such low performance.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted

Allocations rise up right at lagging time and fall down right after when transformations are changed

scene with no dynamic objects creation and deletion, objects are loaded at startup

I done a simple test without ANY my logic at runtime

            double[] lp = { -0.64545863866806, -0.47926938533783, 0.594713389873505, 11366.7563312098,
                            0.76379519701004, -0.405015081167221, 0.502573072910309, 9605.679543647450,
                            0, 0.77862948179245, 0.627484083175659, 5212.77027782132,0,0,0,1};
            Unigine.Game.get().getPlayer().setWorldTransform(new dmat4(lp, true));
            Unigine.Console.get().run("world_load laggy_world");
 

and this makes lagging hell, test it please

Posted

Hi lightmap,

Maybe it are collisions of the PlayerSpectator?
Use console command "show_profiler 3" and look at the "PContacts". What value does it show?
 

Best regards,
Alexander

Posted
Quote

I done a simple test without ANY my logic at runtime

            double[] lp = { -0.64545863866806, -0.47926938533783, 0.594713389873505, 11366.7563312098,
                            0.76379519701004, -0.405015081167221, 0.502573072910309, 9605.679543647450,
                            0, 0.77862948179245, 0.627484083175659, 5212.77027782132,0,0,0,1};
            Unigine.Game.get().getPlayer().setWorldTransform(new dmat4(lp, true));
            Unigine.Console.get().run("world_load laggy_world");
 

and this makes lagging hell, test it please

I can't reproduce this bug. What is inside your laggy_world.cpp file? Maybe it is the cause of the problem.

Posted

laggy_world are saved from runtime scene so no cpp file for it, and no special code inside runtime_scene.cpp, as you can see

runtime_scene.cpp

×
×
  • Create New...