Thierry-
I have been working on my android app...but noticed some strange behaviors in
the android logs that I wanted to pass your way.
Here is a cut of sample code I am using in my app.
String remoteServiceEndPoint =
"http://blah.blah.blah/iMMeta/webdataservice.svc";
Service myService = new Service(remoteServiceEndPoint);
SysShoot ActiveShoot= new SysShoot();
ShootProviderHelper myHelper = new ShootProviderHelper();
Query<SysShoot> theShootQuery =
myService.createQuery("/sysShoots()?$filter=isActive eq true", SysShoot.class);
Iterator<SysShoot> iShoot= theShootQuery.iterator();
Below is a snipit of log from my app that spits out for the above code. I
wanted to check with you on a few things.
04-30 11:15:32.625: INFO/global(518): Default buffer size used in
BufferedReader constructor. It would be better to be explicit if an 8k-char
buffer is required.
04-30 11:15:33.115: INFO/global(518): Default buffer size used in
BufferedReader constructor. It would be better to be explicit if an 8k-char
buffer is required.
04-30 11:15:33.575: INFO/org.restlet(518): Starting the default HTTP client
04-30 11:15:34.034: INFO/global(518): Default buffer size used in
BufferedInputStream constructor. It would be better to be explicit if an 8k
buffer is required.
04-30 11:15:34.055: INFO/global(518): Default buffer size used in
BufferedOutputStream constructor. It would be better to be explicit if an 8k
buffer is required.
04-30 11:15:45.764: INFO/org.restlet(518): Get the metadata for
http://digital-furnace.com/iMMeta/webdataservice.svc/ at
http://digital-furnace.com/iMMeta/webdataservice.svc/$metadata
04-30 11:15:45.945: INFO/global(518): Default buffer size used in
BufferedReader constructor. It would be better to be explicit if an 8k-char
buffer is required.
04-30 11:15:46.485: INFO/global(518): Default buffer size used in
BufferedReader constructor. It would be better to be explicit if an 8k-char
buffer is required.
04-30 11:15:46.965: INFO/org.restlet(518): Starting the default HTTP client
04-30 11:15:47.275: INFO/global(518): Default buffer size used in
BufferedInputStream constructor. It would be better to be explicit if an 8k
buffer is required.
04-30 11:15:47.295: INFO/global(518): Default buffer size used in
BufferedOutputStream constructor. It would be better to be explicit if an 8k
buffer is required.
04-30 11:15:53.944: DEBUG/dalvikvm(518): GC freed 12463 objects / 646712 bytes
in 109ms
04-30 11:16:01.104: INFO/global(518): Default buffer size used in
BufferedReader constructor. It would be better to be explicit if an 8k-char
buffer is required.
04-30 11:16:01.725: INFO/global(518): Default buffer size used in
BufferedReader constructor. It would be better to be explicit if an 8k-char
buffer is required.
04-30 11:16:02.234: INFO/org.restlet(518): Starting the default HTTP client
04-30 11:16:02.555: INFO/global(518): Default buffer size used in
BufferedInputStream constructor. It would be better to be explicit if an 8k
buffer is required.
04-30 11:16:02.574: INFO/global(518): Default buffer size used in
BufferedOutputStream constructor. It would be better to be explicit if an 8k
buffer is required.
04-30 11:16:06.775: DEBUG/dalvikvm(518): GC freed 14622 objects / 764968 bytes
in 98ms
04-30 11:16:11.654: DEBUG/dalvikvm(518): GC freed 13481 objects / 835208 bytes
in 107ms
04-30 11:16:16.834: DEBUG/dalvikvm(518): GC freed 13575 objects / 809480 bytes
in 92ms
04-30 11:16:22.145: DEBUG/dalvikvm(518): GC freed 13529 objects / 808816 bytes
in 111ms
04-30 11:16:27.974: DEBUG/dalvikvm(518): GC freed 14672 objects / 874640 bytes
in 113ms
04-30 11:16:33.394: DEBUG/dalvikvm(518): GC freed 13786 objects / 820520 bytes
in 99ms
04-30 11:16:38.265: DEBUG/dalvikvm(518): GC freed 13235 objects / 822288 bytes
in 101ms
So for
Service myService = new Service(remoteServiceEndPoint);
Query<SysShoot> theShootQuery =
myService.createQuery("/sysShoots()?$filter=isActive eq true", SysShoot.class);
Iterator<SysShoot> iShoot= theShootQuery.iterator();
1- It is doing a roundtrip to the server...Is there anyway to cache the
requests until the query is actually called by hitting the "iterator" or
someother method to start getting the results? It seems kinda "Chatty" over
"Chunky"
2-There is a TON of GC going on for all the objects getting created as you can
tell by the logs. The result of the query is not very big...but there are a
log of objects being subject to GC. Is that normal?
My app becomes non-responsive until the last GC(although I thought the GC was
non-blocking..unless the CPU is maxed). As you can tell from the
timestamps...it takes quite a while for the GC to finish.
Any help sorting out what is going on with RestLet and WCF would be great.
Matthew
> Hello Matthew,
>
> I just would like to tell you that the internal connector now works on
> Android.
>
> Best regards,
> Thierry Boileau
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2599667