Ported the finding projection vector code to C.
Packing, Scaling the uv maps uses existing C code aswell.
Ported the code directly from C to Python
Tested using a couple of meshes
a high poly model (286971 polys), old: hangs blender, new: 2.25 seconds
5 suzanne (2500 polys), old: 0.10 seconds, new: 0.013947 seconds
You can test it out by going to editmode -> Smart Uv Project C, I still kept the old one for comparison sake
Potential backward breaking compatibillity:
After Smart Project Uv C is conducted, the UV selection before the operation is not retained.