Comments on: XML HTTP Performance and Caching http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/ The journal of Emil A Eklund Sat, 29 Apr 2017 07:32:06 +0000 http://wordpress.org/?v=2.0 by: do-init » FAQ AJAX pour le développeur Java http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/#comment-345872 Sun, 12 Apr 2009 14:29:23 +0000 http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/#comment-345872 [...] Ceci dit, les résultats produits avec AJAX permettent des interfaces hautement interactives, réactives et apparemment très rapides. Même si la rapidité réelle peut-être discutée, l’utilisateur a une sensation de vitesse car on lui propose un retour immédiat à ses actions même si les données et traitements sont gérés en arrière-plan. Si vous vous sentez l’âme d’un pionnier capable de gérer les disparités entre navigateurs et que vous êtes prêts à apprendre de nouvelles techniques, AJAX est fait pour vous. Il est probablement préférable de débuter par l’AJAXification d’un petit bout de code de votre application. Nous aimons tous la techno, ici l’objectif est d’améliorer l’expérience de l’utilisateur final, pas de la complexifier. [...] […] Ceci dit, les résultats produits avec AJAX permettent des interfaces hautement interactives, réactives et apparemment très rapides. Même si la rapidité réelle peut-être discutée, l’utilisateur a une sensation de vitesse car on lui propose un retour immédiat à ses actions même si les données et traitements sont gérés en arrière-plan. Si vous vous sentez l’âme d’un pionnier capable de gérer les disparités entre navigateurs et que vous êtes prêts à apprendre de nouvelles techniques, AJAX est fait pour vous. Il est probablement préférable de débuter par l’AJAXification d’un petit bout de code de votre application. Nous aimons tous la techno, ici l’objectif est d’améliorer l’expérience de l’utilisateur final, pas de la complexifier. […]

]]>
by: Garrett Smith http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/#comment-106497 Mon, 27 Aug 2007 00:44:04 +0000 http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/#comment-106497 Emil, The results are very pretty, however, it would be useful to have a running test case. Some benefits are: 1) would provide backup proof to the claim that XHR is faster. 2) would allow Mozilla engineers ability to investigate. 3) relevant for developers who want to make decisions. Can you please post up the test itself? Thank you, Garrett Emil,

The results are very pretty, however, it would be useful to have a running test case. Some benefits are:

1) would provide backup proof to the claim that XHR is faster.
2) would allow Mozilla engineers ability to investigate.
3) relevant for developers who want to make decisions.

Can you please post up the test itself?

Thank you,

Garrett

]]>
by: Garrett Smith http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/#comment-106052 Fri, 24 Aug 2007 20:38:15 +0000 http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/#comment-106052 Emil, Can you provide a testcase that the rest of us can see and run? It would be useful to actually have a running test in the browser, for proof. Thank you, Garrett Emil,

Can you provide a testcase that the rest of us can see and run?

It would be useful to actually have a running test in the browser, for proof.

Thank you,

Garrett

]]>
by: Júlio Greff » Arquivo » Ajax vs. Moda vs. Performance http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/#comment-73966 Mon, 14 May 2007 16:18:17 +0000 http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/#comment-73966 [...] E não é só isso. Há muita coisa que poderia ser evitada. Carregar páginas quase inteiras, pequenos textos estáticos (babem…), outras coisinhas irritantes que pulam na tela… Quer que eu prove que não melhora a performance?  XML HTTP Performance and Caching. Creio que posso te convencer. [...] […] E não é só isso. Há muita coisa que poderia ser evitada. Carregar páginas quase inteiras, pequenos textos estáticos (babem…), outras coisinhas irritantes que pulam na tela… Quer que eu prove que não melhora a performance?  XML HTTP Performance and Caching. Creio que posso te convencer. […]

]]>
by: Fernando http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/#comment-4488 Thu, 17 Aug 2006 19:59:19 +0000 http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/#comment-4488 Hi there, Great article have you wrotten Emil. But by now, i do have a question about your testing case, specially at Firefox browser: I have trying to make a synchronous post request to server side - using XMLHTTPRequest object -, but at this browser, it is bugy, as a have looking at the web and found some information on Bugzilla site [bug id 313646]. So, how do you passthru this issue? Best regards, Fernando Hi there,

Great article have you wrotten Emil. But by now, i do have a question about your testing case, specially at Firefox browser: I have trying to make a synchronous post request to server side - using XMLHTTPRequest object -, but at this browser, it is bugy, as a have looking at the web and found some information on Bugzilla site [bug id 313646]. So, how do you passthru this issue?

Best regards,

Fernando

]]>
by: web http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/#comment-3113 Sat, 15 Jul 2006 06:49:28 +0000 http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/#comment-3113 The reason that synchronous use of XMLHTTP successfully checks the cache may be due to event bubbling within the IE engine. On a synchronous call IE is free to take it's time for request 1 before going on to request 2. At the beginning of request 2, request 1 has fully completed, and request 2 processing takes this into account. The reason that synchronous use of XMLHTTP successfully checks the cache may be due to event bubbling within the IE engine. On a synchronous call IE is free to take it’s time for request 1 before going on to request 2. At the beginning of request 2, request 1 has fully completed, and request 2 processing takes this into account.

]]>
by: Anonymous http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/#comment-2297 Thu, 22 Jun 2006 12:34:23 +0000 http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/#comment-2297 Listing A—read2array method of BigFileReader.java /** * Reads a file storing intermediate data into an array. * @param file the file to be read * @return a file data */ public byte[] read2array(String file) throws Exception { InputStream in = null; byte[] out = new byte[0]; try{ in = new BufferedInputStream(new FileInputStream(file)); // the length of a buffer can vary int bufLen = 20000*1024; byte[] buf = new byte[bufLen]; byte[] tmp = null; int len = 0; while((len = in.read(buf,0,bufLen)) != -1){ // extend array tmp = new byte[out.length + len]; // copy data System.arraycopy(out,0,tmp,0,out.length); System.arraycopy(buf,0,tmp,out.length,len); out = tmp; tmp = null; } }finally{ // always close the stream if (in != null) try{ in.close();}catch (Exception e){} } return out; } Listing A—read2array method of BigFileReader.java

/**

* Reads a file storing intermediate data into an array.

* @param file the file to be read

* @return a file data

*/

public byte[] read2array(String file) throws Exception {

InputStream in = null;

byte[] out = new byte[0];

try{

in = new BufferedInputStream(new FileInputStream(file));

// the length of a buffer can vary

int bufLen = 20000*1024;

byte[] buf = new byte[bufLen];

byte[] tmp = null;

int len = 0;

while((len = in.read(buf,0,bufLen)) != -1){

// extend array

tmp = new byte[out.length + len];

// copy data

System.arraycopy(out,0,tmp,0,out.length);

System.arraycopy(buf,0,tmp,out.length,len);

out = tmp;

tmp = null;

}

}finally{

// always close the stream

if (in != null) try{ in.close();}catch (Exception e){}

}

return out;

}

]]>
by: Emil http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/#comment-1920 Mon, 12 Jun 2006 21:38:10 +0000 http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/#comment-1920 Jamie Lokier > It did, there was a 10 ms delay between the requests. Jamie Lokier > It did, there was a 10 ms delay between the requests.

]]>
by: Jamie Lokier http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/#comment-1919 Mon, 12 Jun 2006 21:21:55 +0000 http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/#comment-1919 Does your test script do the asynchronous XMLHttpRequests in sequence, each one waiting for the previous one to complete (readyState == 4) before starting the next? I ask because if there is overlap, that would defeat caching and that would explain IE appearing to cache only synchronous requests. Even if you wait for readyState == 4, maybe IE takes a short time to commit the received file to cache. Adding a fixed time delay after readyState == 4 would check for that. Does your test script do the asynchronous XMLHttpRequests in sequence, each one waiting for the previous one to complete (readyState == 4) before starting the next?

I ask because if there is overlap, that would defeat caching and that would explain IE appearing to cache only synchronous requests.

Even if you wait for readyState == 4, maybe IE takes a short time to commit the received file to cache. Adding a fixed time delay after readyState == 4 would check for that.

]]>
by: Shaurabh Bharti http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/#comment-1468 Thu, 25 May 2006 09:19:34 +0000 http://me.eae.net/archive/2005/04/02/xml-http-performance-and-caching/#comment-1468 Nice Post! never tested with such scripts, but surely would be interseted in having them and runnning on my programs. Thanks in advance. ~Shaurabh Bharti Nice Post!

never tested with such scripts, but surely would be interseted in having them and runnning on my programs.

Thanks in advance.

~Shaurabh Bharti

]]>