caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Yoriyuki Yamagata <yoriyuki.y@gmail.com>
To: Dmitry Bely <dmitry.bely@gmail.com>
Cc: OCaml mailing list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Re: [ANN] Camomile 0.7.3
Date: Fri, 14 May 2010 22:30:08 +0900	[thread overview]
Message-ID: <AANLkTikdB6l4Qby-rmvsF_nSwowYmg9OZEbXNljjsYf4@mail.gmail.com> (raw)
In-Reply-To: <AANLkTin7IACVaPx4cm6_KEfq9GvvMMRtZneEYMn92b0V@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2276 bytes --]

Hi, Bely.

2010/5/14 Dmitry Bely <dmitry.bely@gmail.com>

> How "heavy-weight" is Camomile? I was a bit scared with the size of
> its distribution. Currently I use under Windows the following my own
> simple Unicode-support module (implemented via
> WideCharToMultiByte/MultiByteToWideChar Win32 API functions). Maybe
> it's time to switch to Camomile?
>
>
The size of the package is due to mapping tables of character encoding and
localization data.  they occupy several mega bytes on the disk but it is
nothing by today's standard.  If you still care, you can delete any .mar
files in charmaps, locales, mappings directory.  (Deleting source files in
these directory is not recommended, since it could cause a failure of
compilation.)  If you delete such files, related encoding and locales do not
function, but other functionality is intact.

As for memory consumption, character mapping tables and localization data
are loaded to the memory when they are required.  So if you do not use them,
they are dead on the disk.  After being loaded to the memory, they are
retained by weak hashtable, therefore, when they are no longer used, GC
releases them.

Some modules load data from database directory during initialization.  They
persists the end of the execution, but these data are usually small (mostly
some kilobytes in the marshaled form, only allkey.mar which used in uCol
module is >100k bytes (*)).  You can avoid loading them by not linking these
modules.

Finally, the programming style to use Camomile would be a bit heavy, since
Camomile uses functors a lot.  In fact, the library itself is a functor
which takes modules containing initialization parameters.

Heaviness aside, Camomile does not provide OS integration, which might be a
problem for you.  I tried POSIX integration but abandoned it by the reason
which I no longer remember :-)  But, you can use UTF16 module to access wch
array, since Windows wch is a 16-bit integer.
(UTF16.t is 16-bit integer array implemented in bigarray module.

(*) I noticed allkey.mar can be retained by weak pointer as well (currently,
it is held in Lazy.t).  I will fix it in the next release, maybe.

Feel free to ask further questions.  I would be grad to answer them.

Best,
-- 
Yoriyuki Yamagata
yoriyuki.y@gmail.com

[-- Attachment #2: Type: text/html, Size: 2776 bytes --]

  reply	other threads:[~2010-05-14 13:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTim0Q-Kd_1cyI_0VT91V_wkCBz2TvmLRDyevQq2H@mail.gmail.com>
2010-05-12 12:13 ` Yoriyuki Yamagata
2010-05-12 13:57   ` [Caml-list] " Romain Beauxis
2010-05-12 14:24   ` Romain Beauxis
2010-05-12 22:02   ` Sylvain Le Gall
2010-05-13  1:19     ` [Caml-list] " Yoriyuki Yamagata
2010-05-13  9:52       ` Sylvain Le Gall
2010-05-14  2:51         ` [Caml-list] " Yoriyuki Yamagata
2010-05-14  6:48           ` Paolo Donadeo
2010-05-14  8:35             ` Dmitry Bely
2010-05-14 13:30               ` Yoriyuki Yamagata [this message]
2010-05-14 13:55                 ` Sylvain Le Gall
2010-05-15 12:15                   ` Yoriyuki Yamagata
2010-05-14  8:14           ` Sylvain Le Gall
2010-05-14 11:35             ` [Caml-list] " Yoriyuki Yamagata
2010-05-14 19:04           ` Florent Monnier
2010-05-18 11:04       ` Yoriyuki Yamagata
2010-05-13 22:17   ` [Caml-list] " forum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikdB6l4Qby-rmvsF_nSwowYmg9OZEbXNljjsYf4@mail.gmail.com \
    --to=yoriyuki.y@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=dmitry.bely@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).