Re: Reducing binary size (for emscripten)

Sebastian Gsänger <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <CAORbcvQ8LxtGcdQ1ikYHUYTMvEzTOkTZx5GZ49aK-gpJ+2vp7A@mail.gmail.com>
Hi,

sure, have a look at:
https://github.com/hein09/vipster/tree/testing/libvipster/ioplugins
As you can see i don't use any exceptions there besides what spirit does
behind the curtains.
I guess the expectation parser makes my grammar very expectation heavy, but
changing it would complicate the overall grammar tremendously.
On the emscripten side, according to the documentation (
http://kripken.github.io/emscripten-site/docs/optimizing/Optimizing-Code.html#other-optimization-issues),
optimization levels other than -O0 disable C++ exceptions completely.
(I guess i should evaluate whether this invalidates my grammar before
caring about filesize :D But so far it still works...)
Nevertheless, whether it's -O2 or -Os or -Oz, the pwinput-parser never
drops below 3MB, considering that i want to add many more parsers that's
not a good outlook.

Sebastian

2017-07-27 19:06 GMT+02:00 Chris Beck <[email protected]>:

> Hi,
>
> I'm also hoping to use qi parsers I wrote with emscripten.
>
> Do you have any examples you can show? I agree that a simple qi parser
> should not lead to multiple megabytes of js, maybe there is some build
> option that can help? For instance are you using c++ exceptions in your
> parsers, and if not are you making sure emscripten turns that off? That can
> have a very large impact on js size.
>
> Chris
>
> On Jul 27, 2017 8:04 AM, "Sebastian Gsänger" <[email protected]>
> wrote:
>
> Hi,
>
> i have written some qi-parsers i'd like to include in a web-application
> via emscripten.
> Unfortunately, i seem to be unable to reach acceptable-file sizes, with
> even simple parsers reaching multiple megabytes.
>
> Has anyone experience with spirit+emscripten?
> And are there some general do-s and don't-s i should learn about,
> maybe some clang-specific tips?
>
> Thanks,
> Sebastian
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Spirit-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/spirit-general
>
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Spirit-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/spirit-general
>
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Spirit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spirit-general
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.