0

Makecode for CPX windows 10 app very slow
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Makecode for CPX windows 10 app very slow

by genus1 on Sun Sep 30, 2018 1:51 am

I am using the different coding languages and noticed makecode has problems even with the file only about 280K. Online makecode takes about 2 seconds to switch from javascript to blocks. On my windows 10 version the same code and switch take 15-20 seconds. In addition, clicking anything to edit takes a LONG time. The below code is as large as I can get on the PC app. Ideally, I would add yaw and x,y, z to make this a very effective glove controller. My pc is very powerful and fully loaded 6 core processor along with top end graphics card. I am going to try to add yaw and x, y, z online to see if Makecode can handle the code. Javascript seems to work better with no limitations so far. I will do CPython next.

Below is the MAX operating Block code I can put on the CPX.

let rollRight = 0
let left = 0
let forward = 0
let rollLeft = 0
let right = 0
let pitchForward = 0
let back = 0
let pitchBack = 0
let hold = 0
let direction = 0
let stopped = 0
// Set lights and roll/pitch variables with PV. Can be
// reset by shake, stops all rotation. pitchBack
input.onGesture(Gesture.TiltUp, function () {
if (direction == stopped) {
direction = back
pause(__internal.__timePicker(500))
}
if (direction == back) {
pitchForward = stopped
pitchBack = back
light.showRing(
`black black black red red red red black black black`
)
pause(__internal.__timePicker(500))
direction = stopped
}
})
// rollRight
input.onGesture(Gesture.TiltRight, function () {
if (direction == stopped) {
direction = right
pause(__internal.__timePicker(500))
}
if (direction == right) {
rollLeft = stopped
rollRight = right
light.showRing(
`black black black black black red red red red red`
)
pause(__internal.__timePicker(500))
direction = stopped
}
})
// pitchForward
input.onGesture(Gesture.TiltDown, function () {
if (direction == stopped) {
direction = forward
pause(__internal.__timePicker(500))
}
if (direction == forward) {
pitchForward = forward
pitchBack = stopped
light.showRing(
`red red black black black black black black red red`
)
pause(__internal.__timePicker(500))
direction = stopped
}
})
// Shake resets variables to start
input.onGesture(Gesture.Shake, function () {
direction = hold
pitchBack = stopped
pitchForward = stopped
rollLeft = stopped
rollRight = stopped
light.showAnimation(light.rainbowAnimation, __internal.__timePicker(500))
light.clear()
direction = stopped
})
// rollLeft
input.onGesture(Gesture.TiltLeft, function () {
if (direction == stopped) {
direction = left
pause(__internal.__timePicker(500))
}
if (direction == left) {
rollRight = stopped
rollLeft = left
light.showRing(
`red red red red red black black black black black`
)
pause(__internal.__timePicker(500))
direction = stopped
}
})
// Initial Start Values
stopped = 0
hold = 99
direction = hold
back = 1
forward = 2
left = 3
right = 4
pitchBack = stopped
pitchForward = stopped
rollLeft = stopped
rollRight = stopped
light.showAnimation(light.rainbowAnimation, __internal.__timePicker(500))
light.clear()
direction = stopped

genus1
 
Posts: 10
Joined: Wed Sep 26, 2018 11:54 pm

Re: Makecode for CPX windows 10 app very slow

by genus1 on Fri Oct 05, 2018 1:27 pm

I would like to know if support has noticed limitations with the PC version of the Makecode editor.

genus1
 
Posts: 10
Joined: Wed Sep 26, 2018 11:54 pm

Re: Makecode for CPX windows 10 app very slow

by adafruit_support_mike on Sat Oct 06, 2018 5:29 am

[moved to the MakeCode forum]

adafruit_support_mike
 
Posts: 54079
Joined: Thu Feb 11, 2010 2:51 pm

Re: Makecode for CPX windows 10 app very slow

by genus1 on Wed Oct 10, 2018 4:26 pm

I would still like to know if support has noticed size edit limitations with the PC version of the Makecode editor.

genus1
 
Posts: 10
Joined: Wed Sep 26, 2018 11:54 pm

Re: Makecode for CPX windows 10 app very slow

by liudr on Sun Oct 14, 2018 11:49 pm

I have the same issues with switching between Javascript and MakeCode. I have a moderate PC but that should more than able to handle such simple task but it would freeze during switching, not to mention it stops uploading code after only a handful of successful uploads per software+hardware restart/unplug.

liudr
 
Posts: 107
Joined: Sat Jan 15, 2011 11:08 pm
Location: USA

Re: Makecode for CPX windows 10 app very slow

by danhalbert on Tue Oct 16, 2018 12:24 am

You might try other browsers, to see if it's faster. MakeCode slowness on large programs is an issue known to the MakeCode folks at MicroSoft.

danhalbert
 
Posts: 1264
Joined: Tue Aug 08, 2017 12:37 pm

Please be positive and constructive with your questions and comments.