Changes between Version 4 and Version 5 of BluePrintLazyRepresentation
- Timestamp:
- 12/18/12 20:34:47 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BluePrintLazyRepresentation
v4 v5 4 4 == Introduction == 5 5 6 For many output formats, data need to represented as strings (or even HTML elements). In the Table definition, you can define a representation method for every Field:6 For many output formats, data need to be represented as strings (or even HTML elements). In the Table definition, you can define a representation method for every Field: 7 7 {{{ 8 8 Field("xy", "reference my_table", … … 15 15 These representation functions receive the field value as parameter, and can perform additional lookups to render this value as string (or HTML). 16 16 17 The problem is that, where many records are to be rendered, these functions are called many times and can therefore become a major performance bottleneck - especially if they perform additional database lookups. For the export of 50 records from a table that contains 5 fields with additional representation lookups, you would need 1 query to retrieve the 50 records, and then 250 additional queries to render them in the output format. 17 The problem is that, where many records are to be rendered, these functions are called many times and can therefore become a major performance bottleneck - especially if they perform additional database lookups: 18 19 For the export of 50 records from a table that contains 5 fields with additional representation lookups, you would need 1 query to retrieve the 50 records, and then 250 additional queries to render them in the output format. 18 20 19 21 In an XML export, where you have 1000 records, this would mean 1 query to retrieve the records - and 5000 additional queries to render the field representations. 20 21 22 == Description == 22 23