Sterc / FormIt

A dynamic form processing Snippet for MODX Revolution
https://docs.modx.com/current/en/extras/formit
33 stars 58 forks source link

Optimize FormItSaveForm export function #120

Closed joeke closed 7 years ago

joeke commented 7 years ago

For big collections the FormItSaveForm can become a bit slow. I suggest the following optimisations for the export.class.php file:

Jako commented 7 years ago

$modx->getCollection is the problem. Better switch to $modx->getIterator and write the output line by line.

joeke commented 7 years ago

Fixed with https://github.com/Sterc/FormIt/commit/5d76390a29544b80837d42f624e4df50b69d8090 and https://github.com/Sterc/FormIt/commit/bde24e2f9a2fb0e6823a61dcc4557e13f1e3c62a