if the data is ok to handle by pointer/reference, just hand it off to a worker thread/pool.
if it isn’t, make a copy in RAM, and hand that off. a copy in RAM might be quick enough to not affect GUI event processing.
again, you have shown zero code for anyone to debug, so there’s nothing anyone can do to help.