Changes between Version 4 and Version 5 of BluePrintLazyRepresentation


Ignore:
Timestamp:
12/18/12 20:34:47 (9 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BluePrintLazyRepresentation

    v4 v5  
    44== Introduction ==
    55
    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:
     6For 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:
    77{{{
    88    Field("xy", "reference my_table",
     
    1515These representation functions receive the field value as parameter, and can perform additional lookups to render this value as string (or HTML).
    1616
    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.
     17The 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
     19For 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.
    1820
    1921In 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 
    2122== Description ==
    2223