Jigsaw Appears to Crash When Calling Lengthy Procedures With "statement" Blocks
When running a very large chunk of code, Jigsaw acts as though it has crashed (fades to grey and is "not responding") before starting up again when the code has finished executing.
Comments (12)
-
-
reporter - attached JigsawGeneralBenchmark.jig
Should take about 25 seconds to run, though midway it will appear to have crashed.
-
Your issue is valid, but you aren't using Jigsaw the way that it was designed. You called t using a statement block, rather than a procedure call block. If you call it with a procedure calling block, then you can see the blocks run... as a statement block, you are running the Python version of the function.
-
reporter Okay, interesting... How would we call a procedure if it does not return anything? (The only way my partner and I found to do that was to use "pass")
-
Drag a Procedure Call-block:
http://calicoproject.org/Calico_Jigsaw#Call-Procedure-block
and type in the name of the procedure in the Properties Tab. You don't need to give a Variable name, as there is no return value.
The "pass" block is a Statement block, and you can enter any statement.
Does that help?
-
reporter - attached JigsawGeneralBenchmark.jig
Yes! That helps a lot. Here's the new code...
However, I find that using this method, while it does not go grey and "not respond" it takes IMMENSELY longer to run. Am I still doing something wrong, or do procedure calls in Jigsaw merely take much longer than computing in Python?
-
reporter Okay, I'm running through the code right now (different computer than this, but the same as I ran the Python version on) and I've projected that it'll take around 37.5 minutes to run... which is around 90x what it took in Python (25 seconds). However, when I called the function using "pass" it took only 26-27 seconds. So it seems that while now it doesn't appear to have crashed, the runtime is significantly longer.
-
You realize that there is a slider bar in the Calico Toolbar that controls the running speed? If you slide it to the left, that is full-speed (and doesn't even update the blocks). Sliding to the right will exponentially slow it down, but will allow students to watch the blocks run. All the way to the right is single-step mode.
-
reporter Just finished running through it at max speed (all the way to the left, "turbo on") and it took 2088 seconds (about 35 minutes).
-
reporter -
Yes, this would take a while on my laptop too in Jigsaw. It runs in about 12 seconds in Python on my laptop when I export it (menu -> File -> Export to Python).
We might be able to update the GUI at the same time that a statement block is running.
I'm not sure Jigsaw can run much faster, though. So, this is beyond the limit of the type of computation it was designed to execute.
-
- changed status to resolved
Fixed issue #18 and issue
#7by updating GUI in statement and assignment blocks→ <<cset 870a8b0669c6>>
- Log in to comment
Can you attach a sample .jig program that exhibits the error?