As a followup, I have finally gotten shared_memory working with python’s multiprocessing module.
I’m still rewriting the rest of the program to make it extremely streamlined.
The new process takes about 72s, compared to the previous processing time of 292s. Parallelize your code! That’s a 75% decrease in time! or put another way, a boost of 400% in efficiency.
Also of note, CPU usage went way up, and memory usage went way down.
Previous CPU -> ~8% Previous RAM -> 3gigs
Current CPU -> ~90% Current RAM -> ~1g
Both are significant improvements.