I have tried everything I can think of to increase the speed of inserts. Which is really only a couple of things with no improvement.
I have chunks of identifiers (Int64) that I need to send to a queue so that my multiple worker roles can work on it without having to worry about concurrency.
I have tried a foreach
loop (both with .ToString()
and BitConverter.GetBytes()
):
foreach(long id in ids) {
queue.AddMessage(new CloudQueueMessage(id.ToString() /*BitConverter.GetBytes(id)*/));
}
And a Parallel .ForAll<T>()
:
ids.AsParallel().ForAll(id => queue.AddMessage(new CloudMessage(id.ToString())));
Both from local and a WorkerRole inside the same data center, the inserts max out at 5 per second, and average 4.73 per second.
Am I doing something wrong?