I have a big array of a custom class. The array may have thousands of items. I have a process that loops through the array and on each element it either does a string comparison or a regex search.
As you know, Xojo only uses a single core. I’m trying to speed up looping through this array. One approach I 've tried (which works) is to get the main app to split the bug array up into 4 smaller arrays (one for each CPU core), write the contents of these smaller arrays to disk and then use 4 helper command line apps to open the files, parse them back into arrays and then iterate through the (now smaller) arrays. Each helper app then reports back its findings to the main app with handles the pooled results.
The main issue with the above approach is the overhead incurred from parsing the contents of the files that contain the encoded array. I have optimised this as much as possible but I feel it’s not good enough.
What would be ideal is if I can have the main app create the 4 smaller arrays and somehow directly pass one of the smaller arrays to each helper app. Is there anyway to pass around an array of objects between apps? Can pointers or MemoryBlocks be used in this way?