Changes between Version 24 and Version 25 of DeveloperGuidelines/Optimisation


Ignore:
Timestamp:
06/16/10 18:54:49 (11 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Optimisation

    v24 v25  
    4343----
    4444{{{
    45 value = db(table.id==id).select(table.field, limitby=(0, 1))[0]
     45value = db(table.id == id).select(table.field, limitby=(0, 1)).first()
    4646}}}
    4747runs 1.5x faster than:
     
    5050}}}
    5151(0.012 vs. 0.007 seconds vs in a test case)
     52
     53NB If only expecting one record then the limitby provides a big speedup!
    5254
    5355Javascript string concatenation: