Hacker News new | ask | show | jobs
by redbell 1091 days ago
Speaking about size reduction, I once had a client who want me to update his product as it became extremely slow and buggy. The product was an MS Word Add-In that was run on an MS Surface which takes shots using webcam and insert them into the active document, it was built in .Net and the previous developer used, as I recall, OpenCV library to take the shots. The installation binary was around 300MB! And, to add insult to injury, both x86 & x64 of OpenCV were included in binary which made the final binary more than 600MB. I then used a tiny lib in C# to take webcam shots and rebuild the entire solution from scratch which generated a binary of around 1MB. The client had some concerns and suspicions about my delivery but once he tried it in a clean Surface, he realized what I did. It was like magic for him but not for me. I was happy because I made him happy :)
2 comments

> clean Surface

Eh, that's not a fair comparison, Windows bundles the .NET standard libraries and runtime.

I might misused the term clean surface, I do not mean a fresh OS install but a surface tablet that hadn’t the old product installed so he can confirm my product do not use any of dependencies of the previous one.
How old was the Add-In? Did the tiny lib you used exist back then and did it support the Surface webcam?
The tiny lib was just a wrapper around some Windows API I guess to read shots from the webcam stream. Also, this lib is not specifically designed for surface laptops/tablets, it was generic, I used a Logitech webcam on dev PC and it worked just fine.
I find it funny how you‘ve gotten a few questions about feature parity, rather than how someone could ever use 300MB for just taking a selfie.