I have a web application using thin clients (bosanova terminals) as an interface for users. I noticed some performance differences in JavaScript between the thin client and the PC. Terminals run Windows XP, built into IE6, and the pages I link to use a prototype JS structure to perform a fairly simple form element validation.
for example, the following that I use to make sure the required fields are filled.
To do this, there are two more .numeric and .alaphanumeric that check and push errors to stop form submission.
$$( '.requiredfield' ).each( function ( elem ){
if ( ( $( elem ).value.length == 0 ) || ( $( elem ).value == null ) ) {
$( elem ).addClassName( "nonvalid" );
$( elem ).siblings().first().addClassName( "error" );
requiredErrors.push( $( elem ) );
}
});
The problem I see is a PC in Firefox or IE, a form with 5-20 fields per page takes perhaps half a second to process longer than without validation. However, it takes 15-25 seconds longer on the terminal to complete a check, except for the same page, without it. As far as I think, I mentioned that I tested this in IE6 on a PC and I don’t see any performance loss. The call to Bosanova led me to update the memory in the terminal, which I did just before this publication, and the results did not change.
I can change the script, so I go through the form fields only once and process .required.numeric.alphanumeric when I go, and that will help, I'm sure. As of now, there is such a difference in performance between the PC and the terminal (thin client). I am curious to know why.
- , /javascript , .
: → → → → → → → → >
, , . , . IE6 , . , , , 1. IE6 2. , 10-50- , . - , 1,2- () 1,6- () , HD/DOM 512 () 1gig (). - , , , / .
: → → → → → → → → >