PDA

View Full Version : Alice is too slow when executing codes!


illserveu
11-28-2011, 08:14 AM
I'm making Tic-Tac-Toe game, with the strategy on Wikipedia. I coded it in C# first, and it's perfect. After many hours, I ported the code to Alice successfully. However, it takes too many time to execute the code, although the loop only scan for 9 game board cells, while in C#, the CPU take not any milisecond to run.

I read a previous topic that tell Alice is slow on Windows 7. Is it really because of Windows 7?

EDIT: Here is an example: This code takes almost 5 seconds to complete!

http://img812.imageshack.us/img812/4063/59477973.png

x2495iiii
11-28-2011, 08:27 AM
Did you make sure all the durations are set to zero or false seconds?

Yeah, the set item x to y command for lists and arrays is by default set to one second. Looped nine times, that code will take 9 seconds to execute.

illserveu
11-28-2011, 09:38 AM
Thank you very much! I didn't know about that. But isn't that... weird? I mean, it's not logistic.

x2495iiii
11-28-2011, 11:24 AM
It is.

It's weird and silly.

But at least it's easy to fix.