Changes between Version 56 and Version 57 of DeveloperGuidelines/Optimisation
- Timestamp:
- 08/30/10 12:59:44 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelines/Optimisation
v56 v57 9 9 There are more things to consider besides performance, e.g. usability and maintainability of code. New contributors should be able to easily understand the code, and bugs should be easy to find. 10 10 11 == Python Tips == 11 == Tips == 12 === Python === 12 13 * http://wiki.python.org/moin/PythonSpeed/PerformanceTips 13 14 * http://www.python.org/doc/essays/list2str/ … … 16 17 * If a specific inner-loop routine cannot be optimised in Python, then consider writing a C routine for this use case. 17 18 18 == Web2Py Tips == 19 === !JavaScript === 20 !JavaScript string concatenation: 21 * http://aymanh.com/9-javascript-tips-you-may-not-know#String_Concatenation_vs._Array.join 22 23 === Web2Py === 19 24 1. Optimize the models, throw away what we don't need. Every field counts.[[BR]]Especially problematic in view of performance are references (joins), as they execute implicit DB requests. The more complex references are, the slower the model loads. 20 25 … … 240 245 }}} 241 246 242 === !JavaScript ===243 !JavaScript string concatenation:244 * http://aymanh.com/9-javascript-tips-you-may-not-know#String_Concatenation_vs._Array.join245 246 247 == Profiling == 247 248 * Web2Py can [http://www.mail-archive.com/web2py@googlegroups.com/msg06267.html use cProfile]: