thrice

Huge performance hit after upgrading from 3.1.0-alpha3.5 to 3.1.0-alpha3.7

Recommended Posts

in 3.5 scene was rending at 60 fps,  now I'm stuck around 45 fps as soon as I upgraded to 3.7

Even worse, load time of the scene increased from 28ish seconds to 75 seconds.

My only hint is a cryptic webgl warning being thrown 

WebGL: INVALID_ENUM: getQuery: invalid parameter name

but even then, I doubt it's responsible for the 15 fps drop (maybe the initial loading increase, IDK)

Any ideas?

-- side issue

Additionally, I tried looking at drawCalls, as that was my KPI in the past for figuring out why frame rate was so low, and I am met with an unhelpful "drawCalls is deprecated. Please use SceneInstrumentation class" warning, and draw calls returning 0.

So I instantiate the instrumentation, and I still don't see draw calls. I would think having that metric easily discoverable is pretty important?

Share this post


Link to post
Share on other sites

First of all... I get this alot too, because every now and then I grab the latest PREVIEW release to make sure the toolkit is compatible with the UP AND COMING changes.

With that being said... IT IS A PREVIEW RELEASE... That means some guy (anybody) can really make changes to the codebase and submit a PR... It may compile and get built in to the latest preview .... That does NOT mean everything is all tested and working... If you want TESTED and WORKING code,  you gotta stick with the official releases.

Also... we are currently in ALPHA so there are gonna be some issues with just grabbing the latest release... you gotta ride it out, check back in a few days, grab again and try rebuild.

If you had a version of Babylon.js that is working ... STICK WITH THAT... Use ANOTHER project to test the viability of the current PREVIEW release.. If ok then update your main project babylon.js

BTW... We should be going to beta soon, so things will be a little more ironed out in the preview release :)

 

Share this post


Link to post
Share on other sites

Thanks for reporting.  It is important to know if there are drops in performance.

If you could give us some detail about your scene or reproduce the issue, that would be very helpful.

Edit:

Here is where you should now be getting drawCall info:

https://github.com/BabylonJS/Babylon.js/blob/0bd16a8b659d71f98c39adf3c1197232d8551830/src/Instrumentation/babylon.sceneInstrumentation.ts#L395

You can also use the debug layer to see the number of draw calls.

https://doc.babylonjs.com/how_to/debug_layer

Share this post


Link to post
Share on other sites
4 hours ago, MackeyK24 said:

First of all... I get this alot too, because every now and then I grab the latest PREVIEW release to make sure the toolkit is compatible with the UP AND COMING changes.

With that being said... IT IS A PREVIEW RELEASE... That means some guy (anybody) can really make changes to the codebase and submit a PR... It may compile and get built in to the latest preview .... That does NOT mean everything is all tested and working... If you want TESTED and WORKING code,  you gotta stick with the official releases.

Also... we are currently in ALPHA so there are gonna be some issues with just grabbing the latest release... you gotta ride it out, check back in a few days, grab again and try rebuild.

If you had a version of Babylon.js that is working ... STICK WITH THAT... Use ANOTHER project to test the viability of the current PREVIEW release.. If ok then update your main project babylon.js

BTW... We should be going to beta soon, so things will be a little more ironed out in the preview release :)

 

I'm well aware, I'm simply trying to help out and narrow down what could have changed between versions to cause issues in my project locally.

Share this post


Link to post
Share on other sites
2 hours ago, adam said:

Thanks for reporting.  It is important to know if there are drops in performance.

If you could give us some detail about your scene or reproduce the issue, that would be very helpful.

Edit:

Here is where you should now be getting drawCall info:

https://github.com/BabylonJS/Babylon.js/blob/0bd16a8b659d71f98c39adf3c1197232d8551830/src/Instrumentation/babylon.sceneInstrumentation.ts#L395

You can also use the debug layer to see the number of draw calls.

https://doc.babylonjs.com/how_to/debug_layer

Ah, thanks for the draw call info. I will look into it further.

Share this post


Link to post
Share on other sites
1 hour ago, thrice said:

I'm well aware, I'm simply trying to help out and narrow down what could have changed between versions to cause issues in my project locally.

I didn't mean to offend, was just trying to clarify :)

 

Share this post


Link to post
Share on other sites
1 hour ago, adam said:

Unfortunately, the inspector is currently not working well in IE or Edge.  

I'm using chromium, app is packaged via electron. So, I can't switch to a diff browser to run it ATM to see if I get different results/debug.

I'm going to downgrade back to previous version for now.

Share this post


Link to post
Share on other sites

Hello!

I cannot repro the performance issue. The load time increase is also utterly suspicious. I'm really interested to understand this because it is too much for a simple bug

Furthermore, I do not repro the getQuery issue. Can you try outside of Electron? 

Can you profile as well to help me understand where the issue is?

 

Share this post


Link to post
Share on other sites

Hey Delta!

I'll try and dig into it again this weekend. Unfortunately I can't just run it without electron ATM because of the way I am loading assets (via the node process) - Ya I wasn't expecting you to be able to reproduce the getQuery issue was more hoping someone knew what it meant, or possibly what it could allude to in terms of the code itself.

I will get a profile if I can't figure out what is going on. Honestly the bigger issue is the fact that my go to tool for figuring out what is going on(simply, engine.drawCalls), has been removed, and I am unable to load any of the new instrumentation stuff currently, so I can't even see if my current draw calls matches bumped version draw calls.

I had a similar issue in the past IIRC, which I saw the drawCalls spiking after upgrading, so I was able to determine that a large number of the meshes that I load off screen and disable (for the sake of tooltips/hover states), were being loaded in at 0,0,0, which was being covered up, so basically the camera was trying to render hundreds more meshes than it should have been. - The reason I think it may be different this time is the strange webgl error, but IDK. Will try and debug it further when I have time.

Share this post


Link to post
Share on other sites
52 minutes ago, agmcleod said:

I've noticed my scene running slower too, even on 3.1.0 beta.

Well some of my scenes have issues with the current 3.1 but performance is NOT one of them. They all run much faster than a few versions ago.

Maybe there was a bug in there for a HOT-SECOND. But my safari builds where running DOG SLOW like 5 - 15 FPS. But now the run at full 60FPS.

I am getting a bunch of uniforms blocking errors, but I am going to track those down and try post the error.

But all and all, compared to a few versions ago 3.1 beta is great so far... Will get better if we can get these little issues tracked down and sent to @Deltakosh 

I can run most (actually, all but one, my space shooter) scenes again at full 60FPS on my Mac OSX. :)

 

Share this post


Link to post
Share on other sites

I found one... This is the scene I made to test shadow baking... On These Later BabylonJS preview release it does seem to be more CPU intensive, especially if I leave the focus of the browser to another window or application, My WHOLE Computer slows down a bit and of course the browser games drop to about 10 - 20 FPS... If I click back and give browser focus... On Chrome and Firefox it speeds back up to 60 FPS... But again seems a bit CPU intensive than before.

There was a version of babylon 3.1 alpha that worked smoothly on all browser for that same scene... I used to show snapshots all at 60 FPS

Anyways... I put that scene on my server at: http://mackey.cloud/games/survive/

Yo @Deltakosh ... Can you please take look and see if your can tell whats up... It does list any errors in console... just real slow on safari and a bit CPU intensive on all others and it was not that way before (at least a few version ago, not sure the number)

Here is the raw project files: Export Output Zip in case you want to put on server and check out all the files.

 

Share this post


Link to post
Share on other sites
50 minutes ago, Deltakosh said:

@MackeyK24 I do not see something obvious on the perf side of your demo

Works pretty well here

image.png

Can you run a profile session on your device as well?

I checked on windows too... Works pretty good.

It must just be with the Mac Version... Can you try it on Mac ???

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.