We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello, I am puzzled about an instability that i reproduced with the following test code :
//scoping test
void setup(){
surface.setVisible(false);
}
void draw(){
noLoop();
scoping();
}
void scoping(){
int w =300; int h = 300;
for (int y = 0; y < h; y++) {
for (int x = 0; x < w; x++) {
int loc = x + y*w;
println(x+" "+y+" "+loc);
}
}
}
For values of w*h larger than #100000 (and sometime less), the code stops with no error display. I need to kill the task for restart. Any idea ? Thank you for helping
Answers
Remember:
draw()
tries to run 60 times a second. Do you really need to do 6 millionprintln()
s a second, for the same data over and over again?I realize it was a real beginner question. Thanks so lot. Denis
Especially println is not reliable, for many many lines better use text()
Thanks, I will try your suggestion on the next bench.