Techmino icon indicating copy to clipboard operation
Techmino copied to clipboard

Severe lagging of several backgrounds on some (mobile) devices

Open C29H25N3O5 opened this issue 2 years ago • 7 comments

Specifically, the aura and the bg1. Significant lagging occurs when these two backgrounds are applied (See more in the following video).

https://user-images.githubusercontent.com/87485746/131534262-d71f8049-351f-4e38-9574-346f7e6b1c4e.mov

As far as I know, this issue only occurs on iOS but not on macOS. Also, other backgrounds that includes “flowing colours” (rainbow,rainbow2) don’t have the same issue.

C29H25N3O5 avatar Aug 31 '21 15:08 C29H25N3O5

this also happen on other phones, maybe the GPU on the phone is too weak to draw these background fast, and i don't know how to make it faster. btw they are written in GLSL

MrZ626 avatar Aug 31 '21 19:08 MrZ626

this also happen on other phones, maybe the GPU on the phone is too weak to draw these background fast, and i don't know how to make it faster. btw they are written in GLSL

Interesting. But my M1 MacBook Pro have no problem rendering these backgrounds while my iPad Pro (A12X) cannot render them properly.

C29H25N3O5 avatar Sep 01 '21 11:09 C29H25N3O5

It should be noted that the compilation of the shaders depend on the architecture and not on the system. That should explain the difference.

Trebor-Huang avatar Sep 01 '21 12:09 Trebor-Huang

It should be noted that the compilation of the shaders depend on the architecture and not on the system. That should explain the difference.

Yeah. Both Apple M1 and A12X are in ARM64 architecture, and the newest iPad Pro is even running on M1.

C29H25N3O5 avatar Sep 01 '21 13:09 C29H25N3O5

Yeah. Both Apple M1 and A12X are in ARM64 architecture, and the newest iPad Pro is even running on M1.

I almost forgot this. Currently the macOS version of Techmino is in Intel (x86-64) architecture, and when running this App on M1 chip, macOS uses Rosetta 2 to translate it to ARM64 App. This does work but the performance is reduced somehow.

However, developers can use Xcode to create a Universal App (Apps that are both in x86 and ARM architecture). Native ARM Apps runs significantly more efficient on M1 chip.

C29H25N3O5 avatar Sep 01 '21 13:09 C29H25N3O5

Hey, this happens to my slow Android phone too! I think it's just because of lag

Not-A-Normal-Robot avatar Sep 02 '21 12:09 Not-A-Normal-Robot

I don't think this is due to poor GPU performance. I use Qualcomm 865, the background is below 3fps, but the GPU occupancy rate is only below 20% (and the frequency is only 305mhz)

shoucandanghehe avatar Oct 03 '21 15:10 shoucandanghehe

Eureka! Due to performence issue, Android use lower precise numbers in shader code. And at the same time, APK config writes <uses-feature android:glEsVersion="0x00020000"/>, It should be changed to 0x00030000 to support highp float type, then Android GPU will use 32-bit numbers.

MrZ626 avatar Sep 10 '22 21:09 MrZ626

(forgot to close this with commit message, doesn't matter)

MrZ626 avatar Sep 10 '22 21:09 MrZ626

pro gramming

Not-A-Normal-Robot avatar Sep 13 '22 23:09 Not-A-Normal-Robot