Trying to resolve the unbearable slowness with the transaction class