On Sat, 2011-02-26 at 17:47 +0100, Stefano D'Angelo wrote:
2011/2/26 Olivier Guilyardi
<list(a)samalyse.com>om>:
> On 02/25/2011 09:13 PM, Stefano D'Angelo wrote:
[...]
So, the latest SLV2 has dropped librdf in favor of a
minimal
RDF/Turtle implementation already done by Dave himself. Such
implementation is basically made of two libraries: Serd (parser) and
Sord (triple store).
Here is the size of the current svn SLV2 and its dependencies on my
machine (arch linux x86-64), all stripped, yet probably compiled with
-02, excluing glib: libslv2 is 61K, libsord is 29K, libserd is 44K,
libpcre is 236K (I didn't know it was a dependency, what is it for
Dave?). That means: slv2+sord+serd = 134K, adding pcre is 370K.
PCRE is a dependency of glib. I don't use regular expressions in these
projects.
Now, libnacore when stripped is 56K... if it could
substitute both
pcre and glib, it would mean the whole stack = 190K + something else.
Considering that Android platforms are probably 32 bit (right?) and
stuff could be compiled with -Os, I would say we would end up
somewhere in between 100 to 250K. Is that still too much?
I could probably make slv2 itself smaller by using a single
non-type-safe collection type rather than the different collection type
for each element type which is the current situation (stupid neanderthal
type primitive type systems). This would reduce the number of functions
quite a bit. Other 'function compression' could also happen, but this
all would break the API thoroughly. Type safety (i.e. lack of dirty
casts and confusing API to use) here is more important than code size,
which I don't think is unreasonable anyway.
I'm more in to shrinking the actual runtime memory overhead to the
absolute bare minimum than shrinking the code. I have roughly infinity
more useful things to do than pretending <100k libraries are bloated :)
Replacing glib, it seems, is the main and by far most significant thing
that needs doing to get a very small embedded appropriate limitation.
The code size of my new libraries, IMO, is well within reasonable limits
for anything that would use LV2 plugins.
-dr