hexagon logo

Issues with large Programs

Hey there!

So, I'm running this program that takes a while (think 1-2 hours) and crunches a ton of data (around 700 dimensions worth). The problem is, every time I run it, the program just freezes and crashes if it gets any kind of error. The program running slow or laggy makes sense for a long program, but the crashing part is a real pain.

I was thinking of breaking the program down into smaller chunks, like subroutines. I haven't really done this before, so any advice would be awesome!

Here's what I'm curious about:

    • Finding Subroutine Material: How can I spot those parts of the code that would work well as separate subroutines, especially the bits that deal with all those dimensions?

    • Break Down Plan: What's the best way to tackle breaking down this program? Should I start small and work my way up, or is there a better approach?

  • Subroutine Secrets: Any tips on designing good subroutines? What should I keep in mind for naming, what data should they take in and spit out, and how should they work in general?
Parents
  • In general, It is hard to answer you questions unless you read through the drawings and understand what kinds of sequence it is on based on different datums or alignments. For example:

    1. Start with datum ABC, then measure 1-150 features, 

    2. Datum DEF, then measure 1510-300 features.

    3. Datum GHI ...

    Then you could separate the program into small piece....

    My thought  

  • does the program have a HUGE cad file?  Do you NEED the cad file to make pretty pictures?

    IF SO, then open the folder where the program is, make a COPY of the cad file (it will show up as COPY OF xxxx.cad.  Then delete the original cad file.  Them, in the program IMPORT a CAD file but use CAD BY REFERENCE.  This will make a cad file of 1k bytes in size and reduce the resources needed when the program is open

Reply
  • does the program have a HUGE cad file?  Do you NEED the cad file to make pretty pictures?

    IF SO, then open the folder where the program is, make a COPY of the cad file (it will show up as COPY OF xxxx.cad.  Then delete the original cad file.  Them, in the program IMPORT a CAD file but use CAD BY REFERENCE.  This will make a cad file of 1k bytes in size and reduce the resources needed when the program is open

Children
No Data