The problem is fixed now, but I don't know what I did.
In my frustration, I decided to leave the above problem alone and generally tidying up the code, and when I ran it later to check something I noticed the slowdown has gone. How strange!
Thanks anyway for your suggestions guys.
In my frustration, I decided to leave the above problem alone and generally tidying up the code, and when I ran it later to check something I noticed the slowdown has gone. How strange!
Thanks anyway for your suggestions guys.