B4J Question CPU Load

Blueforcer

Well-Known Member
Licensed User
Longtime User
I use the b4j bridge to debug my Programm on an 64Bit Pine64 with 4x1,15Ghz.
unfortunately the CPU usage is very high for my feeling. between 60 and 100% all the time.
my test program doesn't actually do much. it's just rotate a pane with css and a timer.
Even in releasemode the cpu load doesnt drop below 50%.

does anyone have an explanation for me?
 

Blueforcer

Well-Known Member
Licensed User
Longtime User
Nothing special

B4X:
t.Initialize("timer",100)
t.Enabled=True

Sub timer_tick
    angle=angle+2
    If angle = 360 Then angle =0
    CSSUtils.SetStyleProperty(Pane1, "-fx-rotate",angle)
End Sub
 
Upvote 0

Blueforcer

Well-Known Member
Licensed User
Longtime User
then there is no cpu load.
But i think a 100ms timer should not push a Quadcore so high?
Even 500ms need 40%
 
Upvote 0

Blueforcer

Well-Known Member
Licensed User
Longtime User
I am aware that a lower interval increases the CPU load. But 500ms should not be a problem for such a processor. especially since the timer runs in a thread.
With a raspberry 1 or 2 I wouldn't be too surprised, but not with such powerful hardware.
 
Upvote 0
Top