Abelius

Hello there,

Since I'm using 3.8.96, I'm noticing lagging AFTER I use Ctrl+Z at some point.

It looks like every Undo operation makes the delays worse, up to the point that I experienced a total freeze renaming some bones.

The thing is, I'm rigging hair now (I have a lot of styles), so the project is growing in complexity. Therefore I'm not sure if this would have happened in 3.8.95 also. Anyway, it's getting really annoying and even has the potential to make me lose work.

I don't think I've hit any hard limit of Spine, but I'm willing to upload my entire project if that helps to try to replicate. :rolleyes:

Thank you.
Hình đại diện của thành viên
Abelius
  • Bài viết: 170

Nate

If you can reproduce the problem everytime, we would love to see your project and the steps to see the problem ourselves! I don't believe 3.8.96 had changes which would cause something like this, though quite a lot needs to happen after undo/redo.
Hình đại diện của thành viên
Nate

Nate
  • Bài viết: 9835

Abelius

It's not so consistent that I get a freeze every time I do a fixed number of steps, but some performance degradation is definitely happening after some time, yes.

I'll work a bit more today and see if I can provide a better troubleshooting starting point. Thanks!

Edit: I have these metrics right now, btw.



---

Edit 2: I'm having consistent freezes now.

They don't happen at any point in particular, but every time I select something I have good chances of Spine freezing.

I also have telltale signs that it's going to happen because I experience "mini-freezes" of one second, prior to the final freeze.

Here's a video of my last session.



You will see me scrolling the viewport sometimes, checking if I have lagging or not. This session in particular wasn't so bad (which is even more worrying), because only at 3:05 you can see a big delay, apart from the others you won't notice because they happened when selecting something on the Hierarchy.

You can also see I have Automatic Backup disabled, to not mistake auto-saving delays with the ones I'm experiencing.

The final freeze happens when I'm creating a root bone for the next hairstyle.

As you see, I'm creating a lot of bones for each hairstyle, which are parented to a central Hair_Root bone. Then I assign each hairstyle bones to their 31 color skins for each style. Dunno if this structure is too much to handle for Spine.

I guess I could spam save every time I do something, but this is approaching a state in which I'm worried I won't be able to work on the project anymore. :rolleyes:

Also, I've opened the project with version 3.8.95, and I've got the same problems. For a moment I thought it was going to be fine, but then I the delays started and I've got a freeze creating a bone on the Viewport.

I'll private message you with a link to my full project.

Thanks!

---

Edit 3: I've just figured out how to cause the freeze in seconds!

A video is better than a thousand images and a million words...:



As you see, Spine starts at about 200MB+ of RAM used but ramps up very fast when switching hair skins, up to 1.1GB, which is the limit if I'm not mistaken.

The funny thing is those images are not imported at PS canvas size, so they're not so huge in size.

I also think that memory use only happens when you actually click on the skin name, not when you enable them with the "pin". Isn't that weird?
Hình đại diện của thành viên
Abelius
  • Bài viết: 170

Nate

In 3.8.96 I created a number of bones in your project, then held right click and panned in circles while hitting undo and redo. I do see a short pause when undo/redo is pressed. If I really mash the undo/redo during animation playback in animate mode, it pauses so much that it falls to 1 FPS (my target FPS is set to 120).

Doing the same in 4.0 there is also a short pause, but it's much less pronounced. When I really mash undo/redo in animate mode, FPS falls from 120 to ~95. Under normal usage I don't think it is enough to be annoying. Your project also loads faster in v4, FWIW.

As for how much Spine will scale, if I duplicate your female skeleton 3 times (so I have 4 of them visible at once), I still get 90 FPS in setup mode and 60 FPS in animate mode (though I tested in Spine v4). That is on a laptop with an i7-8750H CPU and Nvidia GTX 1070 GPU, a desktop PC would get a bit better performance.



Since hidden attachments and skeletons have little impact on performance, I think it is unlikely that you will have problems as your project grows. You may have some minor issues simply because not many projects are so large, but we are happy to solve those problems as quickly as we can.

---

Regarding memory usage, it's normal to reach the maximum relatively quickly, as Spine cleans up memory in the background and only does so more aggressively when the maximum is reached. Also, Spine will hold on to a bit more memory than it needs at the moment because acquiring memory is expensive. Generally memory is in abundance, so it's best to use it to improve performance for a tool like Spine. Other tools, like small utilities or those that run in the background, would want to allocate only a minimal amount of memory.

Clicking a skin in the Skins view makes it the active skin. This is the same as pinning it, but also allows the skin's attachments to be edited. When clicking or pinning a skin, images are loaded for that skin: those needed for the setup pose and all images shown in the current animation. Spine purposefully blocks the UI for a short time to do some of this loading, else you'd see a flash of the green loading placeholders every time you change skins. If the images cannot be loaded in that short time, Spine finishes loading them in the background.

If I open your project, go to animate mode, play, mouse over the bottommost pin in the skins view, and click rapidly to unpin all the skins, in 3.8.96 it's very slow but in 4.0 it's much faster. I think it makes sense to get v4.0 out and then revisit how performance is doing with your project.
Hình đại diện của thành viên
Nate

Nate
  • Bài viết: 9835

Abelius

Hmm, okay. Thanks for the comprehensive explanation.

However, I suspect I didn't explain myself 100%, because you're talking about performance exclusively, and I'm actually getting Spine to stop working (the final freeze). :p It's not a "crash" but everything becoming unresponsive (see the videos).

That's actually what worries me. Performance is not an issue as long as it eventually responds and I don't need to spam save after every change.
Hình đại diện của thành viên
Abelius
  • Bài viết: 170

Nate

Ah, I missed some of your edits and the reproduction steps for the hang. We see the problem and are working on a fix. It's not about image loading this time, instead when the tree gets rebuilt, some memory is not getting freed. Your tree has 1760 nodes, excluding the skin bones listed under each skin. With the skin bones it has 10k+ nodes. That's not too many, but it makes the problem more apparent in your project.

It's maybe a little unfortunate that we list the bones and constraints under the skin nodes, as that can greatly increase the number of tree nodes in a project like yours. It's OK at 10k nodes and can currently scale to 50k or more, but if we use child nodes to list too many other things then it could grow unmanageable.

I know I keep saying how great v4 is, but the tree has been rewritten in v4, and it's pretty great. :D It is more efficient and much faster, which means it can have a higher number of nodes before performance issues begin. We are focused on this problem in 3.8 now and haven't yet checked if the same problem is in v4, but likely it is. It looks like it's been a problem since 3.8.33-beta.
Hình đại diện của thành viên
Nate

Nate
  • Bài viết: 9835

Abelius

Ah okay. I'll hold my breath then. :p

Honestly, this is making things difficult. I can't work for more than four minutes without a hang, so even if I save all the time it's still annoying.

Fortunately, I can imagine this won't happen when I'm animating primary motion, only the hair (when I switch their skins), and I'm still far from that dev phase, so there's still time to see 4.0 and/or a specific fix.

Thanks!
Hình đại diện của thành viên
Abelius
  • Bài viết: 170

Nate

No worries, we'll have a 3.8 fix soon.

---

3.8.97 is now up which fixes this problem. You should be good to go now!
Hình đại diện của thành viên
Nate

Nate
  • Bài viết: 9835

Abelius

Awesome! I've just tested it hard, and it didn't go over 650 MB of RAM use. And no lagging.

Thank you for your lighting-fast response.
Hình đại diện của thành viên
Abelius
  • Bài viết: 170

Nate

Great! :cooldoge: Thank you for your patience while we work through the issues!
Hình đại diện của thành viên
Nate

Nate
  • Bài viết: 9835


Quay về Bugs