Jigsaw Appears to Crash When Calling Lengthy Procedures With "statement" Blocks

Issue #7 resolved
Muhsin King created an issue

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)

  1. Doug Blank

    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.

  2. Muhsin King 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")

  3. Muhsin King reporter

    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?

  4. Muhsin King 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.

  5. Doug Blank

    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.

  6. Muhsin King 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).

  7. Doug Blank

    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.

  8. Log in to comment