Data Processing Best Practices?

I’m developing an application that is almost always going to be used offline, and part of it requires doing some pretty heavy data processing. The data processing won’t be done often, but when it is executed, will do a few math operations (namely cos, sin, acos and multiplication) to approx. 10000 data points in an array.

I guess this probably goes against best practices, since the app will almost definitely hang and will consume a large amount of resources, but as it is, I can’t see a way around it.

I’m just wondering if there’s any better way to do this than a for loop over an array, or if there are any practices I should know about to make this slightly more bearable for the user.