[cairo] Reducing .data

Carl Worth cworth at cworth.org
Mon Dec 18 14:59:01 PST 2006


On Sun, 17 Dec 2006 16:06:13 -0500, Behdad Esfahbod wrote:
> I noticed that the data segment size for cairo had recently slipped over
> 4kb, causing two pages per process to be allocated for cairo.  So I had
> a quick look and could easily chop 1kb off it by using a string-pool
> +offset-table instead of a array-of-pointer in cairo-type1-subset.c.

That definitely seems worth doing.

> We use a string pool plus lookup indices tables now, generated by perl code
> embedded before the tables.  The table in question is the default PS encoding
> table, so no changes are expected in the future.

I'm of mixed feelings here. Ulrich's triple-including scheme allows
for generating a table like this using nothing but the pre-processor,
correct?

That definitely seems a lot better than a perl script that would have
to be extracted out of the C source if we ever wanted to change
anything in the table.

But, if the justification for using the perl script is that we never
expect to edit the table at all, then why is that perl code even here?
Can't we just let the generated tables stand on their own in that
case? (And just trust our code history to hold on to a more "obvious"
form of the table if anyone ever really needs to look for it).

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20061218/37e10c05/attachment.pgp


More information about the cairo mailing list