Share via


Determine the Payload division

Lately I've been thinking about devising a mechanism to determine the division of the Payload between the content that is rendered to client web browser (including markup) and the one that client browser can load, hold and process in its memory. The logic behind this idea is to reduce the network traffic on the wire in PLT-1. And then grab the rest of the [required] data using hidden XMLHTTP calls and keep in browser's memory variables. Certain ActiveX (such as XMLHTTP, XMLDOM) can process the data received through AJAX (XMLHTTP/WinHTTP) call and render to the screen. It saves us two things

1. Processing these records on the web server (saving CPU)
2. Rendering markup from server on the HTTP wire (which can be processed and rendered by a cheaper mechanism on the client browser such as XSLT/JS)

And costs us this

1. More server requests (lightweight though)

However to partially get around the cost mentioned above, we need to keep once loaded data into browser memory variables and not make the request if same thing is being requested again.

Coming back to the main issue, to determine how much data should be rendered by the server, and how much responsibility can be given to the client to load (XML) and process without causing IE memory leaks/overruns. Next is to devise an algorithm to determine this division factor on the basis of size of total renderable data.

let d=data; t=time

d(c) + d(s) = d(tl)      ... (1)

t(c) + t(s) = t(tl)         ... (2)

However, in (2) t(s) is a variable and t(c) is constant [assuming all clients have as usual near about high amount of memory and CPU available]. In order to find the value of d, use of induction could be handy, if performance can be optimized or at least standardized as acceptable. I'll post what I find out of this experiment.

Comments