Page MenuHomeFeedback Tracker

Displaying very long strings on screen has a large impact on FPS, and can hang game
Assigned, WishlistPublic

Description

When displaying a very long string on screen (using hint, systemChat, any dialogue field) the game FPS drops relative to the overall length of the string, even though a small portion of the string is displayed on the screen. This FPS drop can be quite significant, and with a long enough string it will hang the game. {F19806}

Details

Legacy ID
906150339
Severity
None
Resolution
Open
Reproducibility
Always
Category
Scripting
Steps To Reproduce
  1. Use some method of monitoring game FPS (eg FRAPS)
  2. In editor, load attached repro mission. Preview mission.
  3. Note string length is displayed by systemChat, while string is displayed by hint.
  4. Repeatedly activate radio Juliet to double string length. Observe FPS drop as string length increases, and game eventually hangs.
  5. Modify mission to display myString using systemChat, or in watch field of Debug Console and observe similar drop in FPS.
Additional Information

This is a trivial issue, but caused me some confusion trying to find the cause of low FPS while debugging a mission.

My test results (using hint):

String length, FPS
1, 118
2, 118
4, 118
8, 118
16, 118
32, 118
64, 117
128, 116
256, 114
512, 111
1024, 100
2048, 75
4096, 40
8192, 14
16384, 4
32768, <1
65536, <1
131072, (Arma3.exe not responding)

Event Timeline

ceeeb edited Steps To Reproduce. (Show Details)Jun 8 2013, 8:33 AM
ceeeb edited Additional Information. (Show Details)
ceeeb set Category to Scripting.
ceeeb set Reproducibility to Always.
ceeeb set Severity to None.
ceeeb set Resolution to Open.
ceeeb set Legacy ID to 906150339.May 7 2016, 2:30 PM
wUFr added a subscriber: wUFr.May 7 2016, 2:30 PM
wUFr added a comment.Jun 8 2013, 9:14 AM

why you need "2048" and more ? :D nobody will read that

ceeeb added a comment.Jun 9 2013, 8:02 AM

This issue won't affect people playing missions (max characters for hint is about 1000)

However it can cause problems for people making missions with large arrays etc (the simplest way to monitoring dynamic variables is to display them on screen).

SaMatra added a subscriber: SaMatra.May 7 2016, 2:30 PM

Wow, what a great find! Upvoted.

I'd like to refine this a little.

Assigning a variable with concatenated strings using the form myString = myString + myString does not have an effect on performance. However, as soon as this long string is used in any way - output to screen, rpt file, or sent to callExtension, a performance hit is encountered. The severity can range from a short pause, to a complete hardlock.

This issue is still apparent in release build 1.00.109911

ceeeb added a comment.EditedApr 26 2015, 3:11 AM

Update using dev branch 1.43.130502.
1 - 108
...
1k - 108
2k - 91
4k - 45
8k - 14
16k - 4
32k - <1
64k - <1
128k - <1
256k - <1

There is some improvement, as game remains somewhat responsive at longer string length, although extremely slow (many seconds between frames). This issue still has malicious potential.
Displayed stings could be limited to the maximum that actually fits on the screen at any resolution, say 2048 characters?

ceeeb added a comment.Dec 5 2015, 4:43 AM

No change in build 1.54

No change in dev build 1.63.137921