Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Closed] Bad Slate performance


I took a look at the performance with the new profiler tool. And I am very surprised to find that Slate appears to be the culprit.

In the game thread (14ms)

  • A "Total Slate Tick Time" of 7ms while the entire interface is hidden

  • A "World Tick Time" of 4ms, of which 1.5ms is physics and 1.8ms is actual game tick, the rest being small stuff

  • The rest is the "Frame sync"

In the render thread (15ms)

  • SlateDrawWindowsCommand takes 10ms, of which "Present time" takes 9.7ms. The hierarchy isn't helpful : it stops at "self" right after that.

  • RenderView family takes 3.5ms which is completely OK.

The part of this frame time that makes sens amounts to less than 8ms, which is very good. The Slate part howerer is a problem, or should I say two problems :

  • The main Slate container is invisible (EVisibility::Hidden) so I didn't expect any Slate time

  • The interface I show the rest of the time is not trivial, but nowhere near the complexity of the Unreal Editor which runs fine

If that can help, I just uploaded a screenshot of my interface. To break it down, there are 40 button object, each button being a SButton + SBorder + SBox + SHorizontalBox + (content + SImage). The content can either be a simple Slate brush, or more complex like the bottom-left buttons.

alt text

It's not trivial but it's not unreasonable either and I plan on doing more than that. I think any editor window is drastically more complex. All of this is from PIE.

Hardware-wise I've got a i7 3770K, a GTX 660 and 16GB RAM.

Thanks for helping out !

Product Version: Not Selected
more ▼

asked Oct 26 '14 at 08:22 AM in C++ Programming

avatar image

579 53 62 130

(comments are locked)
10|2000 characters needed characters left

The question has been closed Apr 28 '15 at 07:41 AM by Gwenn for the following reason:

The question is answered, right answer was accepted

1 answer: sort voted first

The main Slate container is invisible (EVisibility::Hidden) so I didn't expect any Slate time

At the moment, we call Tick() on EVisibility::Hidden and EVisibility::Collapsed widgets. A CVAR called Slate.TickInvisibleWidgets has been introduced. We are trying it out to see what the fallout will be from no longer ticking invisible widgets. Currently it defaults to 1, but we are looking to make it 0 by default because the results are promising so far.

The interface I show the rest of the time is not trivial, but nowhere near the complexity of the Unreal Editor which runs fine

Do you find that the interface is unresponsive and sluggish, or are you simply unhappy with the numbers? Keep in mind that if you are running PIE, the numbers you are likely to see include all of the editor UI, your game UI, and any profiling tools. If you run with -game you can press ~ to bring up the console and use stat slate to toggle a breakdown of Slate stats. I'm curious about what kinds of numbers you will see.

With all that said, we are looking to make Slate more efficient. Aside from no longer ticking the invisible widgets, we are also looking to be more frugal with game-thread CPU time. These changes are currently in progress, but they have potential to break some existing UIs in annoying ways. We have to be very careful to balance our eagerness to finalize/release the performance enhancements with the need for careful testing. It might take an extra release cycle before these are made widely available.

more ▼

answered Oct 27 '14 at 02:30 PM

avatar image

Fiskislóð STAFF
441 17 11 132

avatar image Gwenn Oct 28 '14 at 07:31 AM

Well, using stat slate, I still get a Slate tick time of 10ms in PIE... Versus 1.5ms in game which is fine, but why is PIE time so large ?

avatar image Fiskislóð STAFF Oct 28 '14 at 12:30 PM

Because when you run PIE, the Slate time includes all the editor drawing. The editor has a lot of non-trivial UI. It also possibly does multiple present calls (depending on which windows you have open). Merely iterating over the myriad of widgets in the editor takes time. All of that amounts to overhead. Enough for 10ms, for sure.

(comments are locked)
10|2000 characters needed characters left

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question