UTF8 Squeak

Yoshiki Ohshima yoshiki at squeakland.org
Mon Jun 11 22:20:54 UTC 2007


  Janko,

> Consider image as a database where you store strings from your 
> application. In that case space efficient but still manipulable strings 
> really matter. For instance, I run one 380MB VW image full of 
> TwoByteStrings and this image would probably have 760M with only 
> FourByteStrings ...

  Just a thought, but if the space efficiency in "the image as
database" is the biggest reason for you to add 16-bit variation, how
about you just write an optimized version of UTF16TextConverter that
works well for WideString (that would convert WideString from/to
ByteArray), and define #hibernate and #unhibernate methods (or
equivalents) at somewhere to convert it to/from upon image shutdown
time and start up time?  This way, only strings you "touch" (to
display the content to screen, etc.) gets unhibernated to WideString,
and rest of (presumably majority of) strings can stay in the 16-bit
representation...

-- Yoshiki



More information about the Squeak-dev mailing list