caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: argentoff@rtelekom.ru
Cc: ocaml <caml-list@inria.fr>
Subject: Re: [Caml-list] huuuuuge executable with pxp
Date: Tue, 21 Sep 2004 10:23:11 +0200	[thread overview]
Message-ID: <1095754991.1134.8.camel@ice.gerd-stolpmann.de> (raw)
In-Reply-To: <200409211203.49504.argentoff@rtelekom.ru>

On Die, 2004-09-21 at 10:03, Paul Argentoff wrote:
> Deal All,
> 
> I really like pxp, but one thing makes me unhappy: when I compile my program 
> with "ocamlfind ocamlopt -package pxp my.ml", the resulting executable is ~3M 
> big. Is there any way of reducing this size? All I need is 
> parse/transform/write an UTF-8 XML text. What lexers are needed, what are 
> not?

I guess you did not install wlex or ulex.

The biggest part of the executable are the UTF-8 lexing tables of the
ocamllex-based lexer (about 1M). By switching to the wlex or ulex lexer
(the latter is only present in the newest release, but simpler to
build), you can reduce the size of the executable significantly. These
alternative lexers are a bit slower, however. After building them,
compile your program with -package pxp-engine,pxp-ulex-utf8 or
pxp-wlex-utf8.

In general you need only the lexer that corresponds to the internal
representation of the XML data.

Gerd
-- 
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany 
gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
------------------------------------------------------------

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2004-09-21  8:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-21  8:03 Paul Argentoff
2004-09-21  8:23 ` Gerd Stolpmann [this message]
2004-09-21 13:39   ` Paul Argentoff

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=1095754991.1134.8.camel@ice.gerd-stolpmann.de \
    --to=info@gerd-stolpmann.de \
    --cc=argentoff@rtelekom.ru \
    --cc=caml-list@inria.fr \
    /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).