Project

General

Profile

Performance optimization for image refresh

Added by Tom Puckett almost 11 years ago

I would like to understand how to get the fastest possible effective frame rate when performing continuous image updates as described below. There is some network traffic that seems unnecessary and I wonder if I can get Wt to avoid it.

During session initialization:

mpTheImage = new WImage(WLink(), "alternate text", root());

mpTheImage->setId("IMIImage");

...

mpTheImage->imageLoaded().connect(this, &ImageDisplayApp::HandleImageRequest);


The handler ImageDisplayApp::HandleImageRequest() renders the next frame's pixels and then:

WLink vLink.setResource(mpImageResource); // mpImageResource points to a WMemoryResource in heap

mpTheImage->setImageLink(vLink);

mpTheImage->refresh();


After the first frame is rendered, I see on the network that the onload event causes a POST command from the browser, a server response, and then a GET for the image resource. This means 2 round trips for each frame. Can this be avoided, perhaps by getting the imageLoaded event to issue a GET directly, or maybe a POST for the image resource directly without an intermediate step?

If standard Wt steps can't do this, do you have support for sockets so I could implement my own streamlined protocol?

Thanks for helping.


Replies (1)

RE: Performance optimization for image refresh - Added by Tom Puckett almost 11 years ago

Sorry, wrong forum. I have reposted to Wt. Please ignore this.

    (1-1/1)