phproject
phproject copied to clipboard
Mappers should only load necessary columns
Particularly for large issue listings, it's unnecessary to load all the fields in the database table when only a small fraction of that data will ever be rendered. For example the description never needs to be loaded in the Browse views or on the Dashboard.
This change would require modifying the \Model
constructor function to accept the $fields
parameter to pass to F3's SQL mapper. Ideally this whole model system would be rewritten to be more flexible for things like this, ideally not requiring custom constructor parameters at all but defaulting to the table name either derived from it's class name or the $this->table_name
property. This would allow us to still directly use F3's mapper parameters.