in reply to Thread very slow
Sorry. But until I see it (and reproduce it), I don't believe that your diagnosis of the problem is correct.
Whichever of the "two ways" you show to enqueue your data, you are actually doing exactly the same thing. In both cases, you simply passing a list of values to enqueue().
Regardless of whether you extract those values from within a hash, or pass them as constants, what will end up on the queue, and therefore be received by the thread, is identical. And so this cannot be the reason for any significant change in performance. It simply cannot be.
I'm not suggesting that you aren't seeing a performance difference, nor even that the change you document isn't somehow triggering it; but it cannot directly be the cause.
I can only suggest that you either post the full code here, or if it is too big (>64k I think), stick it on a pastebin somewhere and link to it. Or you can send it to me by email.
|
|---|