I'm sending a very large string from one application to another on localhost using sockets in python. Small strings move instantly, but large strings seem to take a while longer (I say large, but I'm talking maybe a MB or two at the very most). Enough that I have to sit and wait a few seconds after I do something in one app before it shows up in another.
What bottlenecks are involved here? As I understand it, with sockets on 127.0.0.1, all I'm really doing is moving data from one point in memory to another. So transferring even hundreds of MB at a time should move perceptually instantly on my workstation.