[OpenJDK 2D-Dev] Fw: [PATCH] Allow linking in (shared) libfontconfig directy

Phil Race Phil.Race at Sun.COM
Mon May 21 22:40:54 UTC 2007


Diego 'Flameeyes' Pettenò wrote:
> Hi,
> On Mon, 21 May 2007 13:18:15 -0700
> Phil Race <Phil.Race at Sun.COM> wrote:
>> Also since we dlclose, we reclaim the virtual memory, rather than
>> keeping it around when it will never be used again. That is there
>> is a very small bounded set of times when we might load this lib,
>> so its not something we keep coming back to.
> Most of the memory is freed, yes, but there are still the fontconfig
> files mapped anyway, as the termination function is not called.

The code is there. Its just not enabled as the function was not
in the fontconfig versions on supported platforms when it was written.

> Anyway, please note that by using lazy bindings, the heaviest cost is
> deferred to when the functions are actually used (the binding itself);
> on the other hand, using direct link rather than dlopen can let
> libfontmanager make good use of prelinking (dlopen-ed libraries does
> not work with prelink out of the box, but let's not get into that right
> now, as it's a quite long argument of which I only know a few
> summaries).
> You should also consider that most of the modern Linux (and FreeBSD,
> and probably other Unix-like operating systems) desktops already have
> libfontconfig loaded at any time in memory, as almost every desktop
> environment for X11 uses it, and this makes the costs of loading
> libfontconfig very time almost non-existent.

I could construe this either way. If its almost free it doesn't
matter if you do even if you don't need it, or if you do it twice.


>> Also I'll be making some fontconfig related changes
>> fairly soon .. once I can clear my desk so to speak, so
>> its probably not a good time to do this, even if its
>> really going to make a difference, which I doubt.
> Will wait then, I'm not in a hurry :)

More information about the 2d-dev mailing list