2 Replies Latest reply on Dec 12, 2012 4:44 AM by Dan Bracuk

    Performance

    RKP_

      Hi

       

      I read about revalidating data submitted in server side in many post.

      I need to know the about perfromance statistics on validating a piece of data two times(client and server side).

       

      regards

      RKP

        • 1. Re: Performance
          BKBK Adobe Community Professional & MVP

          RKP_ wrote:

           

          perfromance statistics on validating a piece of data two times(client and server side).

          Client-side validation performance doesn't count, as far as you are concerned. The browser or some other client is in charge of that.

           

          Server-side validation performance depends on how much validation you wish to do, and how robustly.  Perhaps the commonest form of server-side validation is the validation of form and URL variables. ColdFusion has functions like isValid, isDefined, structKeyExists, len, and so on, that enable you to perform most validation tasks.

           

          The performance cost of calling these functions is negligible in the context of page execution times of, say, several seconds. However, if your validation code involves the creation and manipulation of a large number of objects, or connecting to another server(database, ftp, http, mail), then the performance cost could be as high as tens of seconds per page request or even minutes.

          • 2. Re: Performance
            Dan Bracuk Level 5

            Client side validation is done to make your app more useable.  Server side is done to make it more reliable.

             

            Deciding whether or not to do it depends on:

            1.  The liklihood of client side validation being bypassed, and

            2.  The consequences of bad data being processed.

             

            As BKBK suggested, most of the time we are talking about nanoseconds.

             

            If you want to see for yourself, do this.

             

            <cfset startTicks = GetTickCount()>

            validation code

            <cfdump var="#GetTickCount() - startTicks# msecs">