Re: SISC on Android and the Heap
Chad Albers <[email protected]> Tue, 2 Mar 2010 21:26:16 -0500
| Newsgroups | gmane.comp.java.sisc.user |
|---|---|
| Message-ID | <[email protected]> |
--===============2831729561261752386==
Content-Type: multipart/alternative; boundary=00c09f9729a1fc84730480dc34ac
--00c09f9729a1fc84730480dc34ac
Content-Type: text/plain; charset=UTF-8
Hi Scott,
I did try to create the heap manually by following what happens in
GenerateHeap.java, just in case building it was quicker than deserializing
it. The build failed.
I took your advice about the profiler. Android, indeed, has one called
traceview (
http://developer.android.com/guide/developing/tools/traceview.html). I
don't' have much experience with profilers, so the information is murky to
me. I set up a trace around line 173 in AppContext.java where
r.eval("(initalize)"); is called. Here's as screen shot:
http://neomantic.com/images/traceview.png
I sorted by 'Exclusive' time, the time inside a method, java.io.DataInput
comes in on top, but it really has to do with
sisc/ser/BerEncoding.readBerLong, the 2nd one, one of those sisc.ser.*
classes. But I may be reading this wrong.
Do these results tell you anything? Got any advice on what I should be
looking for?
Thanks for your help,
Chad
--
Chad Albers
http://www.neomantic.com
(pgp signature available on request)
On Mon, Mar 1, 2010 at 11:25 AM, Scott G. Miller <[email protected]> wrote:
> On Sun, Feb 28, 2010 at 6:22 PM, Chad Albers <[email protected]>wrote:
>
>> I've been plugging away on getting SISC to work on Android, and made more
>> progress. But I've hit a major obstacle: serialization and deserialization
>> is notoriously slow on Android. Really slow. Embedded inside a Android
>> App, SISC takes about 45 seconds to run a simple eval on the emulator. Most
>> of that time is spent on (initialize) - which performs a lot of
>> deserialization on the precompiled heap file.
>>
>> My question is can I operate SISC in some way without using the
>> precompiled heap, and instead loading in the code precompiled in the heap.
>> Scott Miller's 2002 paper seems to imply that this is possible, provided
>> you're willing to take a 10-15 sec performance hit (page 5).
>>
>>
> The alternative to the heap is to load all the startup code from scratch,
> which is way slower (by about an order of magnitude). It may be possible
> however to sacrifice some space (ie a bigger heap) and use a different
> encoding. Does the Android platform have a profiler? Seeing where the bulk
> of the time is spent during startup may help suggest a different heap
> storage strategy.
>
>
>> Even if I manage this task, my next question is how often does SISC use
>> serialization/deserialization during processing...(I suspect a great deal).
>>
>>
> Code is lazily loaded in using ser/deser during operation, yes, but the
> bulk of R5RS is available when you hit the prompt.
>
> Scott
>
--00c09f9729a1fc84730480dc34ac
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Hi Scott,<div><br></div><div>I did try to create the heap manually by follo=
wing what happens in GenerateHeap.java, just in case building it was quicke=
r than deserializing it. =C2=A0The build failed.</div><div><br></div><div>I=
took your advice about the profiler. =C2=A0Android, indeed, has one called=
traceview (<a href=3D"http://developer.android.com/guide/developing/tools/=
traceview.html">http://developer.android.com/guide/developing/tools/tracevi=
ew.html</a>). =C2=A0I don't' have much experience with profilers, s=
o the information is murky to me. =C2=A0 I set up a trace around line 173 i=
n AppContext.java where r.eval("(initalize)"); is called. =C2=A0H=
ere's as screen shot:=C2=A0<a href=3D"http://neomantic.com/images/trace=
view.png">http://neomantic.com/images/traceview.png</a></div>
<div><br></div><div>I sorted by 'Exclusive' time, the time inside a=
method, java.io.DataInput comes in on top, but it really has to do with si=
sc/ser/BerEncoding.readBerLong, the 2nd one, one of those sisc.ser.* classe=
s. =C2=A0 =C2=A0But I may be reading this wrong. =C2=A0</div>
<div><br></div><div>Do these results tell you anything? =C2=A0Got any advic=
e on what I should be looking for?</div><div><br></div><div>Thanks for your=
help,</div><div><br></div><div>Chad</div><div><br></div><div><br clear=3D"=
all">
--<br>Chad Albers<br><a href=3D"http://www.neomantic.com">http://www.neoman=
tic.com</a><br>(pgp signature available on request)<br>
<br><br><div class=3D"gmail_quote">On Mon, Mar 1, 2010 at 11:25 AM, Scott G=
. Miller <span dir=3D"ltr"><<a href=3D"mailto:[email protected]">sgmill=
[email protected]</a>></span> wrote:<br><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im">On Sun, Feb 28, 2010 at 6:22 PM, Chad Albers <span dir=3D=
"ltr"><<a href=3D"mailto:[email protected]" target=3D"_blank">calber=
[email protected]</a>></span> wrote:<br></div><div class=3D"gmail_quote"><=
div class=3D"im">
<blockquote class=3D"gmail_quote" style=3D"border-left:1px solid rgb(204, 2=
04, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
I've been plugging away on getting SISC to work on Android, and made mo=
re progress. =C2=A0But I've hit a major obstacle: serialization and des=
erialization is notoriously slow on Android. =C2=A0Really slow. =C2=A0Embed=
ded inside a Android App, SISC takes about 45 seconds to run a simple eval =
on the emulator. =C2=A0Most of that time is spent on (initialize) - which p=
erforms a lot of deserialization on the precompiled heap file.=C2=A0<div>
<br></div><div>My question is can I operate SISC in some way without using =
the precompiled heap, and instead loading in the code precompiled in the he=
ap. =C2=A0Scott Miller's 2002 paper seems to imply that this is possibl=
e, provided you're willing to take a 10-15 sec performance hit (page 5)=
.</div>
<div><br></div></blockquote></div><div><br>The alternative to the heap is t=
o load all the startup code from scratch, which is way slower (by about an =
order of magnitude).=C2=A0=C2=A0 It may be possible however to sacrifice so=
me space (ie a bigger heap) and use a different encoding.=C2=A0 Does the An=
droid platform have a profiler?=C2=A0 Seeing where the bulk of the time is =
spent during startup may help suggest a different heap storage strategy.<br=
>
=C2=A0<br></div><div class=3D"im"><blockquote class=3D"gmail_quote" style=
=3D"border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;paddi=
ng-left:1ex"><div></div><div><div><div>Even if I manage this task, my next =
question is how often does SISC use serialization/deserialization during pr=
ocessing...(I suspect a great deal).</div>
<div><br></div></div></div></blockquote></div><div><br>Code is lazily loade=
d in using ser/deser during operation, yes, but the bulk of R5RS is availab=
le when you hit the prompt. =C2=A0 <br><br>Scott<br></div></div>
</blockquote></div><br></div>
--00c09f9729a1fc84730480dc34ac--
--===============2831729561261752386==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--===============2831729561261752386==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Sisc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisc-users
--===============2831729561261752386==--