Welcome! It’s hard to say what’s causing allocations or slowing down your code if you don’t share it with us - please share a MWE (minimal working example) showing the problem.
Please read: make it easier to help you
Also, have you followed most of the tips mentioned in the Performance Tips section of the manual?