I’ve never used a Pi or a NUC but aren’t Pis flash storage and NUCs SATA? I’d expect a big latency difference because of that, especially if you are accessing the storage multiple times to perform a task.
edit: to give an idea of difference just to access a drive, for me at least…
When I first noticed the problem, the data I was transferring to the liststore was stored on an SSD. I thought that the USB3 connection might be a problem, so I moved the data to the internal SD card. When that change did not help, I moved the data to ramdisk. Slow in every case.
I commented out the statement for actually appending the data to the liststore so that I was measuring the elapsed time just for transferring the data. On the NUC, I get numbers around 2-3 ms. When I append to the liststore, the numbers are around 240 ms. On the Raspberry Pi, I get numbers around 22 ms for the transfer alone and 2200 with the append to liststore.
I thought it interesting that both numbers for the Raspberry Pi are about 10x the numbers for the NUC. That observation made me wonder whether the Raspberry Pi was running at full speed. It was running at 0.6 GHz. The Intel CPU was at 2.4 GHz. The difference of 4x partly explains the 10x difference in execution time. It now seems plausible that the difference in performance can be attributed to the power of the CPUs. I am not sure about that conclusion because the speed of the CPU changes. Sometimes it is as high as 1.8 GHz on the Raspberry Pi.
To ebassi, no doubt my code can be optimized. I will explore your suggestions.