News for hackers. Stuff that matters.
Re:App sizes are out of control by joshvm on Tuesday August 01, 2017 @01:12PM (#14902979)
This happens a lot, especially with dynamic linking. I have a project that uses Qt, OpenCV, CUDA, PCL and VTK - fairly standard stack for 3D imaging and visualisation.

Since you normally need to bundle dependencies to account for different versions, this adds up quite fast. Qt adds 20MB for OpenGL, 15MB for the VC++ redist, about 30MB for other core libraries. Some stuff in OpenCV requires Nvidia's performance primitives (NPP), so in goes nppi64_80.dll - that's 100MB alone. opencv_cudaarithm310.dll is 70MB and even opencv_imgproc310.dll weighs in at 30MB. And on and on.

So yes, one little call to cv::cuda::remap adds in a boatload of dependencies when all the algorithm is doing is using a lookup table to sample an image.

https://github.com/opencv/opencv/blob/master/modules/cudawar...

Re:App sizes are out of control by maxxxxx on Tuesday August 01, 2017 @02:00PM (#14903488)
It's pretty ironic that dynamic linking's main motivation was to eliminate duplicate code and reduce code size. Deploy a DLL once, every software uses it and doesn't have to include it.

Now it has turned out exactly the opposite way. If we went back to linking object code together we would get smaller sizes. Instead we have to include huge DLLs.

Re:App sizes are out of control by verytrivial on Wednesday August 02, 2017 @07:11AM (#14909594)
> dynamic linking's main motivation was to eliminate duplicate code and reduce code size

I'm pretty sure the main motivation is/was to allow patching of dependencies independently from applications. Very popular shared libraries might save space overall, but that is a secondary effect.

Re:App sizes are out of control by maxxxxx on Wednesday August 02, 2017 @01:26PM (#14912661)
When I started out the main motivation was to get install sizes down. At least on Windows patching never really worked and ended in "DLL hell".
Re:App sizes are out of control by dfox on Tuesday August 01, 2017 @03:56PM (#14904693)
IIRC Windows has pretty involved infrastructure for deduplicating same executable images both in memory and on disk.
Re:App sizes are out of control by boondaburrah on Tuesday August 01, 2017 @08:53PM (#14906946)
I had a fun time with this once. The Jetbrains Toolbox app is written using Qt and is 150mb. I opend the .app package on mac, deleted the frameworks directory, and symlinked it to my system's Qt install.

It's now 6mb.

Re:App sizes are out of control by AstralStorm on Wednesday August 02, 2017 @03:14AM (#14908551)
And it will break at random due to API or ABI incompatibility. Have fun gluing the pieces back together.
Re:App sizes are out of control by boondaburrah on Wednesday August 09, 2017 @06:03PM (#14974140)
They seem to build it against a reasonable version of Qt, I haven't updated it in a while (because it's just a launcher), and when I do I'll just re-symlink against whatever Qt is currently installed (which I do keep updated)

I understand your argument, but in this particular case things aren't volatile enough that it causes any problems, and if it does it's just as easy to solve.