Hi I'm building an application which retrieves a CSS like content through http and renders it to the smartphone using edgelib.
I'm using the Class Main OnNetMessage to retrieve the images to display (very little size less than 20k) with the following code
and it takes very long time to retrieve the content aproximately 14 sec for a total of less than 100k (one image 32K, two 4K images and a css code 0.5k) content even if I'm connected through a 3G network with HSDPA
I was wondering if i'm doing something wrong? I tried to control also the display->Flip() in case that some cpu was used during nextFrame but i have the same problems. Is this a bad programming approach or a smartphone issue. I'm using HTC Tiny II which is one of the best in the market as far as i know.
Thanks
I'm using the Class Main OnNetMessage to retrieve the images to display (very little size less than 20k) with the following code
- Code:
case IMAGE_OFF_DOWNLOAD:
switch(msg)
{
case ENET_RECEIVEDATA:
stack.Push(buffer, bufsize);
break;
case ENET_CLOSEDSOCKET:
if (stack.GetResponseInfo(&info;))
{
if (stack.BodySize() > 0)
{
char *bodydata = NULL;
unsigned long bodydatasize;
bodydata = (char *)ClassEMemory::Alloc(stack.BodySize());
if (bodydata != NULL)
{
stack.GetBody(bodydata, bodydatasize);
//read and react on body data
webpage_datasize=bodydatasize;
sprintf(debug,"size=%d",webpage_datasize);
WriteImageOffToFile(bodydata,webpage_datasize,imgfilename,this->ecd.dsp);
ClassEMemory::DeAlloc(bodydata);
} else{
sprintf(debug,"bodydata ==NULL");
}
}
}
stack.Clear();
break;
}
break;
and it takes very long time to retrieve the content aproximately 14 sec for a total of less than 100k (one image 32K, two 4K images and a css code 0.5k) content even if I'm connected through a 3G network with HSDPA
I was wondering if i'm doing something wrong? I tried to control also the display->Flip() in case that some cpu was used during nextFrame but i have the same problems. Is this a bad programming approach or a smartphone issue. I'm using HTC Tiny II which is one of the best in the market as far as i know.
Thanks