- MXHR response is not compressed by default.
This is illustrated very well in their text only demo. MXHR stream is always slower than normal mode. I opened up the packet sniffer. The normal stream is compressed while the MXHR is not. - Data URI scheme is broken.
The web is broken by IE for a long time. IE6 and IE7 will be still around for a few years. Image data cannot be served in cross-browser manner. The same performance can be achieved by spriting: putting the tiny-images into one image (overhead is small if the image is large enough), preload the combined imaged, and use background-position to get the coordination. - Multipart is not streaming
Well, it is under DUI.Stream namespace. However, it is not streaming. The server is packing up the data into one response. The library is processing the data on-the-fly but the received data is accumulating.
1. If the size of the response is not large (i.e. can be stream in a couple seconds), enveloping the message in JSON or XML could be easier.
2. If the size of the response is large (i.e. comet style), the responseText is going to become very large. We call it memory leak.
Showing posts with label ajax. Show all posts
Showing posts with label ajax. Show all posts
Thursday, May 21, 2009
MXHR
Digg is creating a multipart capable XHR library. Good try but not very useful. Here is why:
Wednesday, April 22, 2009
XML vs. JSON - Size Comparison
I was wondering how compact is JSON comparing to XML. I grabbed an arbitrary XML from the web and convert it to an equivalent JSON format. It turns out that JSON is around two-third of the XML size.
XML: 596 bytes | JSON: 402 bytes |
<?xml version="1.0"?> <message> <header> <to>companyReceiver</to> <from>companySender</from> <type>saveInvoice</type> </header> <info> <saveInvoice> <invoice date="01-20-2000" number="123"> <address country="US"> <name>John Smith</name> <street>123 George St.</street> <city>Mountain View</city> <state>CA</state> <zip>94041</zip> </address> <billTo country="US"> <name>Company A</name> <street>100 Main St.</street> <city>Washington</city> <state>DC</state> <zip>20015</zip> </billTo> <items> <item number="1"> <name>IBM A20 Laptop</name> <quantity>1</quantity> <USPrice>2000.00</USPrice> </item> </items> </invoice> </saveInvoice> </info> </message> |
{ header:{ to:"companyReceiver", from:"companySender", type:"saveInvoice” }, info:{ saveInvoice:{ invoice:{date:"01-20-2000,number:"123", address:{country:"US", name:"John Smith", street:" city:" state:"CA", zip:"94041" }, billTo:{country="US", name:"Company A", street:" city:" state:"DC", zip:"20015" }, items:[ { name:"IBM A20 Laptop", quantity:1, USPrice:2000.00 } ] } } } } |
Subscribe to:
Posts (Atom)