Jump to content

Troubleshooting low FPS


johnfn
 Share

Recommended Posts

Hey guys,

Been working on a game with Pixi recently. The game started running at a lower FPS and I'm not sure why. I opened up the performance tab and indeed I see that frames are coming in slower occasionally:

image.thumb.png.4363368e6101d75a8df74603771eb349.png

Notice the frame that takes 32.8ms instead of 16.6 as expected.

However, the performance tab doesn't give much of a clue as to why this is. No big CPU usage spikes, no GPU spikes, and no other obvious problems I can see. 

How should I go about debugging this?

Full source is here https://github.com/johnfn/ld46, but it's enormous and I have no expectation that anyone actually reads through it. More curious about general approaches here. 

(I am rendering a bunch of huge textures and I assume that's what the issue is. However, I'd REALLY like to know HOW to debug this sort of thing from first principles, assuming I know nothing!)

Link to comment
Share on other sites

How should I go about debugging this?

I dont remember if profiler actually shows GPU load, your app its probably gpu-bound.

I can look at that , but I'm too busy with my tasks :( Give more info about project, how many pixels do you think you fill on screen?

I am rendering a bunch of huge textures

shouldnt be a problem. How many pixels are actually drawn on screen is. If you have 10 full-screen layers - that's the problem.

Link to comment
Share on other sites

27 minutes ago, ivan.popelyshev said:

I am rendering a bunch of huge textures

shouldnt be a problem. How many pixels are actually drawn on screen is. If you have 10 full-screen layers - that's the problem.

No need to actually debug my code :) This makes sense, but it also makes me wonder. I have a parallax background with about 10 layers, and each of the layers are pretty big (1500x1000ish). How would I go about optimizing something like this? 

Link to comment
Share on other sites

Convert what you can to geometry and eliminate huge parts that arern't being rendered for sure.

if you have many transparent parts, you have to polygon-pack it, you can use pixi-heaven to use polygon packing with pixi sprites, it supports texturepacker input. If you can do one sprite like this, you can emulate tilingSprite with just 2-4 sprites like that.

Link to comment
Share on other sites

for me nothing wrong here ! or nothing about pixi itself
Look more a structure issue
This is why i manually release GC in specified area with a scene loader, maybe you have too much thing in the GC and it release at random position in your streaming.
Also notice you use front-end react for you dev tool, it seem make big computing.
Hard to say what wrong, it a complexe projet.
But for me , i dont think it pixijs issu, but you maybe need confirm by a pro.
look more in react,chunker,and GC
zndDoZ2d_o.png

Edited by jonforum
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...