MDL-40618 backup: centralize info field, use info in queries.
authorRussell Smith <mr-russ@smith2001.net>
Thu, 11 Jul 2013 06:53:01 +0000 (16:53 +1000)
committerRussell Smith <mr-russ@smith2001.net>
Tue, 23 Jul 2013 09:50:53 +0000 (19:50 +1000)
commit3e7e2ab2eedd970ced90db4d8cd18b6d8449f9eb
tree7218e08488724ec79e773465383644d7ee6374cd
parentffc3f5308b3cb41213a0610d5e53e1c8f67d261c
MDL-40618 backup: centralize info field, use info in queries.

encode_backup_temp_info() and decode_backup_temp_info() have been
introduced to keep the info field encoding in one place.
Many locations used get_backup_ids_record() to obtain info, that
makes lots of calls to get_backup_ids_record() which can be slow.
We now complete all those inline by adding the info field to the query.
To reduce memory usage, all queries of that nature have been changed
to use get_recordset_*. gzcompress was introduced if available to minimize
traffic to/from the database and to decrease the memory required for caching.
The compression time is saved by the benefits in other places of having smaller data.
backup/moodle2/restore_stepslib.php
backup/upgrade.txt
backup/util/dbops/backup_controller_dbops.class.php
backup/util/dbops/restore_dbops.class.php
backup/util/dbops/tests/backup_dbops_test.php