owlcs/owlapi — pull request #318 by sesuncedu (2014-11-24 01:10:34+00:00)
Title: Reduced footprint for string literals - for review of approach rather than direct merge 

This is a sketch of some simple ways of saving space for string literals.

1: Don't store java.lang.String values in Literals
2: Use byte arrays if all character code points are < 256 .
3: Otherwise store naked char arrays
4: Store byte arrays directly in specialized version of AnnotationAssertionAxiom (not implemented as subtype).

This is a proof of concept - plain literals aren't handled; data property assertions aren't special cased; neither are 16bit char array literals assertions, and performance impact has not been measured for cases where getLiteral() is called frequently (the new Literal classes implement CharSequence, but that is not the same thing).

For the Taxon test case,

Size of internals for version 4.0.0 is 867,936,432
Size of Internals for ~version 4.0.1 is 654,548,864
Size of Internals with byte array literals is 521,827,424
Size of internals with byte array assertions is 464,594,112 (~30% reduction from 4.0.1)