in reply to Re^2: Thread very slow
in thread Thread very slow

I think there must be still something going wrong with your serialization, as Thread::Queue basically does what you do, except it's using the (slightly faster in most cases) Storable::nstore to serialize the data for the queue.

As you haven't shown the code where you construct %gen_data and the values you construct them from, it's hard to guess. If you can construct an example without Tk that exhibits the behaviour, that would be convenient. If you can post (a small excerpt of) how you populate %gen_data, that might also lead to more clue as to what really goes wrong.