[Other] Flash Player: Intense rotation lag on modern processors
#1
Posting this here in hopes that someone here has more information:

The process of drawing some forms of text rotation in Flash Player seem to cause intense lag on some modern processors, despite being perfectly fine on something older. So far all testing has been on Windows.

The problem seems to occur on processors with 16 or more logical processors (though this is not confirmed)

There has been some work over on PR3 to determine who it happens to, and thus a possible cause.
So far, we know the following:

  It happens in several games
    This bug happens in both PR2 and PR3 from my testing. It also seems to happen in Learn to Fly 2, especially in the shop.

  It is hardware dependent
    The problem has been confirmed to occur on Ryzen 2000 and 5000 series processors. It also occurs on Intel 12th gen processors, and there has been a report of it happening on an i9-9900K.

  It is specific to certain forms of text
    I don't know what's different about player text and art layer text, but on both PR2 and PR3, the lag only occurs with player nametag text.

  It is fixed by setting Flash Player to run on only one logical processor
    This is a terrible solution, but it does work. Unfortunately, this can cause lag in other places, at least in PR3. Works great for LTF2 though, it made it playable for me.

  It is fixed by using Adobe Scout to profile the bug
    The bug does not happen when using a debug version of flash player and profiling it with Adobe Scout. The lag immediately returns when profiling ends.

  Lag is independent of resolution and quality.
    It just happens. Changing the quality of resolution seems to have no effect on the problem at all.

  CPU usage is lower than expected.
    Despite lagging, the reported CPU usage from something like Task Manager suggests that Flash Player uses less CPU while the lag is happening.

  Hardware acceleration has nothing to do with it.
    The bug seems to happen regardless of whether hardware acceleration is enabled or not. The problem also seems to occur without regard for GPU vendor.


No specific cause of this problem is currently known.

The quickest way to test this problem that I know of is to play Learn to Fly 2 in flash player and get to the shop. If the rotation of the menu on the right causes intense lag, this problem probably affects you.

  
Below is a list of processors the problem is reported to occur on. OS is also shown if known. If a specific processor isn't known, then the processor series is listed.

  AMD Ryzen 2700X, Windows 10
  AMD Ryzen 5700X, Windows 10
  AMD Ryzen 5900X
  Intel i7-12650H, Windows 11
  Intel 12th Gen CPU
  Intel i9-9900K

Below is a list of processors the problem is reported to not occur on. OS is shown if known

  AMD A4-5300 APU, Windows 7
  Intel i5-8400T, Windows 10
  Intel i5-4200U
  AMD Ryzen 5 5600H, Windows 11


More tests would be greatly appreciated.
i failed the mario twitter challenge
The Following 3 Users Say Thank You to ThePizzaEater1000 For This Useful Post:
  • bls1999, Camer the Dragon, tadtad
#2
On PR2 this seems to happen more when
- There are other players in a race
- Those players are nearby to you
- Player coming from offscreen whilst you're rotating causes the most severe lag
á
The Following 1 User Says Thank You to Camer the Dragon For This Useful Post:
  • ThePizzaEater1000
#3
Great write-up of a very irksome bug. This occurs on my Mac and PC, both with 8(?) cores.

Is it dependent on flash player version? I've heard earlier versions like 9 or 10 (prior to Adobe purchasing macromedia) don't have these kinds of problems, but I have no independent confirmation of this.

I think starting a debug session probably has some different processing implications. Adobe Scout is a much more advanced version of a flash player debugger.

The heavy lag also occurs when breaking crumble blocks for me. The cheese hat absolutely destroys my performance.


I post about the latest site updates on the Dev Log. If you have suggestions, feel free to post them here.
@Eternal and I pay for this site out of our own savings. Please consider donating to help keep Jiggmin's Village running.
The Following 1 User Says Thank You to bls1999 For This Useful Post:
  • ThePizzaEater1000
#4
This happens to me in just about every flash game. In terms of playing on browser, it's because of the emulator lol, it takes a ton of ram for some reason (I've found mine at around 99% in the past and I have 32 gigs).
Source: Arkandian Crusade and My Pet Protector III run badly.
[Image: LLwQFov.png]
The Following 1 User Says Thank You to Lego-man945 For This Useful Post:
  • ThePizzaEater1000
#5
(7th February 2023, 11:28 PM)Camer the Dragon Wrote: On PR2 this seems to happen more when
- There are other players in a race
- Those players are nearby to you
- Player coming from offscreen whilst you're rotating causes the most severe lag
As far as I can tell, it's specifically seeing rotated player nametags that causes the lag, which seems to line up with what you've described.

(8th February 2023, 2:06 AM)bls1999 Wrote: Great write-up of a very irksome bug. This occurs on my Mac and PC, both with 8(?) cores.
That lines up with other reports pretty well. It does seem to be specifically the number of threads, since from testing on Tad's new laptop, which has 10 cores (but only 12 threads, because of the whole efficiency core thing), it seems to work fine in those circumstances.

(8th February 2023, 2:06 AM)bls1999 Wrote: Is it dependent on flash player version? I've heard earlier versions like 9 or 10 (prior to Adobe purchasing macromedia) don't have these kinds of problems, but I have no independent confirmation of this.
From my testing with Learn to Fly 2, the issue does not happen on flash player version 8r22.

(8th February 2023, 2:06 AM)bls1999 Wrote: The heavy lag also occurs when breaking crumble blocks for me. The cheese hat absolutely destroys my performance.
I don't have cheese hat in pr2, but when I crumble blocks in pr3, I don't get an unreasonable amount of lag. Jiggmin might've done crumble differently between the two games though, so this might not be equivalent.


(8th February 2023, 3:42 AM)Lego-man945 Wrote: This happens to me in just about every flash game. In terms of playing on browser, it's because of the emulator lol, it takes a ton of ram for some reason (I've found mine at around 99% in the past and I have 32 gigs).
Source: Arkandian Crusade and My Pet Protector III run badly.
This seems to me like it might be a different problem? At least on my system, most flash games run perfectly fine. I mainly use the Platform Racing series and the Learn To Fly series as examples because those are the only games that I've seen the problem happen on.
i failed the mario twitter challenge
The Following 1 User Says Thank You to ThePizzaEater1000 For This Useful Post:
  • Camer the Dragon
#6
(8th February 2023, 7:12 PM)ThePizzaEater1000 Wrote: I don't have cheese hat in pr2, but when I crumble blocks in pr3, I don't get an unreasonable amount of lag. Jiggmin might've done crumble differently between the two games though, so this might not be equivalent.
Is this when you fall through and auto-break a lot of them?
á
#7
(7th February 2023, 11:28 PM)Camer the Dragon Wrote: On PR2 this seems to happen more when
- There are other players in a race
- Those players are nearby to you
- Player coming from offscreen whilst you're rotating causes the most severe lag

Should also note the laptop I have has:
NVidia GTX 1650
AMD Ryzen 5 4600H, Windows 10 [3GHz, 6 Cores, 12 Logical Processors]

Here's a link to a vid I put on Discord about it: https://discord.com/channels/52867952270...5975101470
á
#8
Just tested this, I don't encounter any problems at all with text on art layers. Does this mean text on art layers is baked as BitmapData rather than being an object?
#9
(13th February 2023, 11:57 AM)Kwing Wrote: Just tested this, I don't encounter any problems at all with text on art layers. Does this mean text on art layers is baked as BitmapData rather than being an object?

I believe this is the case.


I post about the latest site updates on the Dev Log. If you have suggestions, feel free to post them here.
@Eternal and I pay for this site out of our own savings. Please consider donating to help keep Jiggmin's Village running.
#10
(13th February 2023, 11:57 AM)Kwing Wrote: Just tested this, I don't encounter any problems at all with text on art layers. Does this mean text on art layers is baked as BitmapData rather than being an object?
As far as I can tell, PR2's text data does seem to be rendered as a vector at all times, same as PR3 text (but only in level editor).

This implies that there's something different about player tag text, but I don't know what. (and I know it's player tag text, because the lag went away when I removed it)
i failed the mario twitter challenge
#11
This bug makes no sense. Latisty (one of the affected PR3 players) stopped being affected by it. He got it to happen again by unplugging his controller.
i failed the mario twitter challenge
#12
Another update:
Setting the cacheAsBitmap property to true on player text boxes provides a huge help for the lag. While it doesn't help when players are actively rotating, it does let you be around differently rotated players without particularly bad lag.
i failed the mario twitter challenge
The Following 1 User Says Thank You to ThePizzaEater1000 For This Useful Post:
  • bls1999
#13
Can confirm this happens on an AMD Ryzen 9 5950x too
[Image: dDh1Lkq.png]
#14
(16th February 2023, 7:14 PM)ThePizzaEater1000 Wrote: Another update:
  Setting the cacheAsBitmap property to true on player text boxes provides a huge help for the lag. While it doesn't help when players are actively rotating, it does let you be around differently rotated players without particularly bad lag.

Great sleuthing! I'll add this to the next update.


I post about the latest site updates on the Dev Log. If you have suggestions, feel free to post them here.
@Eternal and I pay for this site out of our own savings. Please consider donating to help keep Jiggmin's Village running.
#15
(17th February 2023, 2:23 PM)bls1999 Wrote: Great sleuthing! I'll add this to the next update.

It was Iso's idea to add it in the first place (it started becoming a big enough problem on pr3 that we've been trying to fix it)

Currently, we're trying to see what makes map text not lag so we can make name text be like that
i failed the mario twitter challenge
The Following 1 User Says Thank You to ThePizzaEater1000 For This Useful Post:
  • bls1999
#16
Further testing: I am starting to suspect that virtualization may be related. I don't know why it would be but opening valorant improved the lag so anything is on the table. We're mostly trying to figure out why Latisty (running an i9-9900K) doesn't get the lag anymore.

We've confirmed that Norton Antivirus does not solve the lag (thank god). It seems the controller thing caused everything to lag. Gladiator also doesn't get the lag anymore, and he says he might've turned virtualization on at some point for WSL.
i failed the mario twitter challenge
#17
(7th March 2023, 11:34 PM)ThePizzaEater1000 Wrote: We've confirmed that Norton Antivirus does not solve the lag (thank god).

That would've been such a meme lmao
á
The Following 1 User Says Thank You to Camer the Dragon For This Useful Post:
  • bls1999
#18
(17th February 2023, 3:34 PM)ThePizzaEater1000 Wrote: It was Iso's idea to add it in the first place (it started becoming a big enough problem on pr3 that we've been trying to fix it)

Currently, we're trying to see what makes map text not lag so we can make name text be like that

Iso knows what he's talking about so I trust his judgment. Have you guys made any progress other than finding the cacheAsBitmap property fix for all textboxes?

Just to confirm, that's all the player and chat textboxes right? Does the issue occur only when updating the text output (changing colors, text content, etc) or is it constant?


I post about the latest site updates on the Dev Log. If you have suggestions, feel free to post them here.
@Eternal and I pay for this site out of our own savings. Please consider donating to help keep Jiggmin's Village running.
#19
(8th March 2023, 10:43 AM)bls1999 Wrote: Iso knows what he's talking about so I trust his judgment. Have you guys made any progress other than finding the cacheAsBitmap property fix for all textboxes?

Just to confirm, that's all the player and chat textboxes right? Does the issue occur only when updating the text output (changing colors, text content, etc) or is it constant?

The lag seems to happen any time Flash redraws the rotated text, so updating text output would probably trigger it, though that's not as much of a concern because player textboxes are constant and chat doesn't rotate.

We haven't found anything other than the cacheAsBitmap fix.
i failed the mario twitter challenge
#20
A solution has been found!

Swapping useFlashType from 1 to 2 in jpexs for the name box text objects completely eliminates all rotation lag.

[Image: jHbLlEK.png]
i failed the mario twitter challenge
The Following 3 Users Say Thank You to ThePizzaEater1000 For This Useful Post:
  • bls1999, Camer the Dragon, tadtad


Forum Jump:


Users browsing this thread: 2 Guest(s)