Many methods in glimpse benefit from placing large arrays into shared memory to share across parallel processes. We currently accomplish this task using sharedmem, which has worked brilliantly but has some downsides:
Possible alternatives to consider:
Many methods in
glimpsebenefit from placing large arrays into shared memory to share across parallel processes. We currently accomplish this task usingsharedmem, which has worked brilliantly but has some downsides:multiprocessing.Poolcomes at the cost of not supporting Windows. However, this comment bysharedmem's author suggests that this can be addressed by installing Windows Subsystem for Linux (WSL, https://docs.microsoft.com/en-us/windows/wsl/install-win10).MapReduceno longer seems to work on Python 3.8 (see MapReduce no longer working on Python 3.8 rainwoodman/sharedmem#24), requiring the slowerMapReduceByThreadto be used (glimpse.config.backend = sharedmem.MapReduceByThread).Possible alternatives to consider:
multiprocessing, which as of Python 3.8 implementsSharedMemory(https://docs.python.org/3/library/multiprocessing.shared_memory.html).joblib, especially once/ifSharedMemoryis supported (Feature: Multiprocessing-based Backend using SharedMemory + Pickle 5 for 2-3x Faster IPC joblib/joblib#1094, Python 3.8 SharedMemory as alternative to memmapping during multiprocessing joblib/joblib#915).ray, based on the tutorial here: https://towardsdatascience.com/10x-faster-parallel-python-without-python-multiprocessing-e5017c93cce1.