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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

[4.5] The Output Log degrades performance

In 4.5 preview, the Output Log causes a big performance hit. The larger the log, the worse.

Hiding the Output Log solves the issue. Clearing the Output Log solves the issue until it grows again.

In my case, the editor can go from 120fps to 20fps in just a few minutes with an empty scene and just one log per frame.

Product Version: Not Selected
more ▼

asked Oct 13 '14 at 05:19 PM in Bug Reports

avatar image

61 8 12 14

avatar image Eddy71 Oct 16 '14 at 01:07 PM

Since 4.5, same problem for me. When showing the output log, big slow down for the editor.

Also, the UI vertical scrolling bar is blocked.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

The output log is our most extreme example of a multi-line editable text, however it shouldn't be causing that level of performance degradation. Given that it only happens when the log is visible, it's most likely something in OnPaint() - I'll take a look.

For reference, what spec is your machine?

more ▼

answered Oct 13 '14 at 05:43 PM

avatar image

Jamie Dale STAFF
7.5k 176 66 304

avatar image TS100101 Oct 13 '14 at 05:51 PM

Here you have my DxDiag.

I know my rig is starting to get outdated, but I don't think that's the issue. I haven't had this problem in previous versions of the engine.

dxdiag.txt (68.4 kB)
avatar image TS100101 Nov 05 '14 at 08:39 PM

Did you take a look into this ?

I also noticed that left-clicking inside the Output Log freezes the editor, like when an application gets stuck into an infinite loop. I suppose is related. (?)

avatar image Jamie Dale STAFF Nov 05 '14 at 08:42 PM

Sorry, not yet.

I have an open ticket for it, and I've been trying to get to it but I've just been really busy with other changes for 4.6. I hope to take a look at it before the end of the week.

Thanks for your patience.

avatar image Jamie Dale STAFF Nov 14 '14 at 07:24 PM

Just to let you know, I'm currently looking at this.

When the output log isn't being modified, most of the perf. drop comes from text rendering. I've done some work to improve the font cache access, but really there's some larger Slate perf. changes that will become part of 4.7 that should make this equivalent of the perf. in 4.4.

When the output log is being modified, as in the case of your "log once per-frame" case, the perf. drop comes from the increasing layout complexity as new text is added. Seeing as we're not wrapping the output log, there should be some nice wins that we can get by skipping some parts of the layout process. I'm currently investigating these.

avatar image TS100101 Nov 14 '14 at 07:41 PM

Great! Thank you Jamie.

I'll try to avoid per-frame logs for now, then.

Please, don't forget about the freezes when left-clicking on the Output Log. It's not just a performance issue.

BTW, I get lots of this errors when I change the focus from the Output Log to other editor window :

LogWindowsTextInputMethodSystem:Error: Deactivating a context failed while setting focus to the disabled TSF document manager.

I don't know if it's related.

avatar image Jamie Dale STAFF Nov 18 '14 at 11:52 AM

Don't worry about that warning, it's unrelated and has actually been removed in 4.6 since it fired a lot when things were actually fine.

I've fixed your perf. issues when logging a lot of output log text: https://github.com/EpicGames/UnrealEngine/commit/7775242a9362fa07cfbba8b8270bf2f946852c25

It turned out to be quite simple. FTextLayout::AddLine was causing a re-flow of the entire document when a new line was added, rather than only flowing the line that was being added.

I've not being able to reproduce your hang when left-clicking (or right-clicking) in the output log. Does that happen all the time, or only when there is a lot of text in the output log?

avatar image TS100101 Nov 18 '14 at 05:26 PM

Great news! Thank you Jamie. I suppose the fix will be included into 4.6 release, right ?

About the hangs, I've been investigating further and it happens :

  • Always when left-clicking, except if you make the first left-click into the first line of the log (you can interact normally with the text after that).

  • Never when right-clicking, except if it is the first click you make and you have left-clicked before.

When I say first click, I mean the first click you make after having clicked any other part of the editor, not necessarily the first click you make after the application starts.

Scrolling with the wheel always works fine, btw.

avatar image Jamie Dale STAFF Nov 30 '14 at 03:05 PM

I've still not been able to reproduce the hang, however several people have reported it now, so you're certainly not alone.

Are you building from source? It sounds like something is getting stuck in a loop, and if you're building from source it would be really handy if you could reproduce the hang, then pause the debugger and post the callstack from the main thread. That should give me a better idea of where to look.

avatar image TS100101 Dec 02 '14 at 03:10 PM

Hi Jamie, here's the call stack :

      [Código externo]    
 >    UE4Editor-Core.dll!FTextStoreACP::RequestLock(unsigned long dwLockFlags, HRESULT * phrSession) Línea 195    C++
      [Código externo]    
      UE4Editor-Core.dll!FWindowsPlatformMisc::PumpMessages(bool bFromMainLoop) Línea 757    C++
      UE4Editor.exe!FEngineLoop::Tick() Línea 2111    C++
      UE4Editor.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Línea 133    C++
      UE4Editor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Línea 190    C++
      [Código externo]    

Just for clarification (in case something has changed in 4.5.1) I used the 4.5.0 source code to make the test.

The line 195 is this one :

 *phrSession = AdviseSinkObject.TextStoreACPSink->OnLockGranted(LockManager.LockType);
avatar image Jamie Dale STAFF Dec 02 '14 at 03:14 PM

Excellent, thanks :)

That's the TSF based IME code. Are you using an IME, and if so, which?

avatar image TS100101 Dec 02 '14 at 03:26 PM

I don't think so. I didn't even know that was a thing until know. I'm spanish and I have a standard spanish keyboard.

avatar image TS100101 Dec 02 '14 at 03:40 PM

I think I got it! Looks like unplugging my Wacom tablet solves the issue.

avatar image Jamie Dale STAFF Dec 02 '14 at 06:07 PM

Ah, that's interesting.

When you're getting the hangs, are you actively using the tablet to navigate (as if it were a mouse), and do you know if you have any handwriting input features enabled for it?

It's possible that it's being picked up as an IME device, and that we're not handling it correctly.

avatar image TS100101 Dec 02 '14 at 06:27 PM

I always have my tablet plugged in but I never use it for navigation.

Looks like windows enables by default a service called "Touch Keyboard and Handwriting Panel".

I disabled it following these instructions.

Now the editor doesn't freezes anymore even with my tablet plugged in. :)

avatar image Jamie Dale STAFF Dec 02 '14 at 06:33 PM

Success! :D

Thanks for your help tracking this down, it would have never occurred to me that this combination would cause that behaviour.

I'm going to try and get my hands on a tablet to test with as several people have reported this hang (I'm also checking to see if they have the same root cause - at least one of the callstacks is the same as what you posted above).

I'll reply again once I have more information, and hopefully, a fix :)

avatar image Jamie Dale STAFF Feb 18 '15 at 03:44 PM

Okay, I managed to get hold of a Wacom Bamboo tablet today.

The issue only seemed to happen on Windows 8, and was seemingly caused by us telling the TSF run info that it had a length much greater than the maximum buffer size it told us was available - I'm guessing this caused TSF to overrun an internal buffer.

Should be fixed by 23cb8cbc5b90b684f65edd2c0a21a731d219fd56

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

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

Answers to this question