Changes between Version 66 and Version 67 of DeveloperGuidelines/Optimisation


Ignore:
Timestamp:
03/29/11 22:13:31 (10 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Optimisation

    v66 v67  
    267267 * http://developer.yahoo.com/blogs/ydn/posts/2009/10/a_engineers_gui/
    268268
     269== Scalability ==
     270
     271Much of your code will behave well with just a few test records in the database.
     272
     273But in real-world scenarios, the system might have to handle tens of thousands of records - which means that your functions could be called tens of thousands of times in a single request. Will it still give reasonable response-times?
     274
     275Ah - so you think that your onvalidation function will be called only once after the user has submitted the form, and so it doesn't harm that it takes 50ms compared with 600ms for the rest of the request? Maybe you're wrong: in an XML import of 100.000 records that same onvalidation routine would be called 100.000 times in a single request, which would give 1 hour 23 minutes for your onvalidation function alone, compared to 600ms for the rest of the request!
     276
     277Hence:
     278Always think in scales of a few thousand records, especially for sequentially called routines like representation of field values, onvalidation and onaccept functions. Do you really need to do all this once per record, or could it be done just once in the request?
     279
     280
    269281----
    270282DeveloperGuidelines