Re: [Plib-devel] Patches for FreeBSD
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2004-12-31 14:47:00
|
Martin Spott wrote: >>Anything else need looking into ? > > The FreeBSD port maintainer recently suggested the attached patch in > order to create shared libraries by default - although I don't know if > this meets the intentions of the PLIB developers. No - it doesn't. > Honestly I _never_ create shared PLIB libraries ;-) No - me either. The problem is that it's too easy to swap out the library without recompiling the application. This causes really subtle and hard to diagnose problems with end-users because PLIB is such a heavily C++ class-based application with lots of inline functions. The benefits with shared libraries are not typically very useful to the kinds of application people use PLIB for. So, I would strongly advise against this change for FreeBSD and I certainly won't accept anything of the sort for Windows or Linux. The reasoning behind this is as follows: Right now, an end user can upgrade his copy of PLIB very easily without preventing ANY of his existing binaries from working - even if the changes we made were not reverse compatible, etc, etc. If he uses binary distributions of games, then they won't be dependent on PLIB itself (which is a HUGE benefit for game writers) - if he builds his programs from source then there still isn't a problem because the header files and libraries always match. Shared libraries are good for two things: 1) Saving disk space by making binary files smaller. 2) Saving RAM by having multiple applications share the same library binary image (I'm not even sure this works). These days, in the era of $1 per Gigabyte hard drives, the cost of having non-shared libraries is something of the order of one tenth of a cent per application. Since there are probably only a few dozens of PLIB applications on most people's hard drives, the cost of non-shared libraries on disk space is a few cents. Saving RAM (even if it works in practice) is unlikely to be very necessary for the kinds of applications PLIB is used for because they are highly interactive - and typically consume a very large fraction of CPU and graphics bandwidth - so the end user is most unlikely to be running more than one or two of them at any given time. So PLIB gains ZERO benefit from being a set of shared libraries - but incurrs all of the problems in the worst possible ways. Just say "NO" to shared libraries for PLIB! ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |