Re: Is there a pure JS implementation of the WOFF2 Brotli codec?

"Robert O'Callahan" <[email protected]> Thu, 16 Jul 2015 14:42:33 +1200
Newsgroups gmane.comp.web.fonts
Message-ID <CAOp6jLYvnMG7_cvwJQoegMYaRdUEuEG23Ryyk+g1fnuUQfHBcg@mail.gmail.com>
--001a113eca94fb1fa8051af50503
Content-Type: text/plain; charset=UTF-8

On Thu, Jul 16, 2015 at 4:46 AM, Mike Kamermans <[email protected]> wrote:

> Yeah,that's the conclusion we had to draw too - debugging the running
> process revealed that the emscripten'd library was allocating three massive
> array buffers (~313MB each), just by loading the library, so that's either
> a nasty emscripten bug, or could be a deferred allocation pattern that
> works in C++ but turns into instant allocation in JS.
>

It sounds like you must be instantiating the asm.js module three times,
since normally there would be just one heap array per instance.

Anyway, I think you should work this out with the emscripten community,
since there's clearly a problem and it shouldn't be hard to diagnose and
fix.

Rob
-- 
lbir ye,ea yer.tnietoehr  rdn rdsme,anea lurpr  edna e hnysnenh hhe uresyf
toD
selthor  stor  edna  siewaoeodm  or v sstvr  esBa  kbvted,t
rdsme,aoreseoouoto
o l euetiuruewFa  kbn e hnystoivateweh uresyf tulsa rehr  rdm  or rnea
lurpr
.a war hsrer holsa rodvted,t  nenh hneireseoouot.tniesiewaoeivatewt sstvr
esn

--001a113eca94fb1fa8051af50503
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Thu, Jul 16, 2015 at 4:46 AM, Mike Kamermans <span dir=
=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">nihongo=
@gmail.com</a>&gt;</span> wrote:<br><div class=3D"gmail_extra"><div class=
=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>Yeah,=
that&#39;s the conclusion we had to draw too - debugging the running proces=
s revealed that the emscripten&#39;d library was allocating three massive a=
rray buffers (~313MB each), just by loading the library, so that&#39;s eith=
er a nasty emscripten bug, or could be a deferred allocation pattern that w=
orks in C++ but turns into instant allocation in JS.<br></div></div></block=
quote><div><br></div></div>It sounds like you must be instantiating the asm=
.js module three times, since normally there would be just one heap array p=
er instance.<br><br></div><div class=3D"gmail_extra">Anyway, I think you sh=
ould work this out with the emscripten community, since there&#39;s clearly=
 a problem and it shouldn&#39;t be hard to diagnose and fix.<br clear=3D"al=
l"></div><div class=3D"gmail_extra"><br></div><div class=3D"gmail_extra">Ro=
b<br></div><div class=3D"gmail_extra">-- <br><div class=3D"gmail_signature"=
><div dir=3D"ltr">lbir ye,ea yer.tnietoehr=C2=A0 rdn rdsme,anea lurpr=C2=A0=
 edna e hnysnenh hhe uresyf toD<br>selthor=C2=A0 stor=C2=A0 edna=C2=A0 siew=
aoeodm=C2=A0 or v sstvr=C2=A0 esBa=C2=A0 kbvted,t rdsme,aoreseoouoto<br>o l=
 euetiuruewFa=C2=A0 kbn e hnystoivateweh uresyf tulsa rehr=C2=A0 rdm=C2=A0 =
or rnea lurpr =C2=A0<br>.a war hsrer holsa rodvted,t=C2=A0 nenh hneireseoou=
ot.tniesiewaoeivatewt sstvr=C2=A0 esn<br></div></div>
</div></div>

--001a113eca94fb1fa8051af50503--