1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-14 10:13:05 +02:00
pgbackrest/doc/xml
David Steele 4d84820021 Improve performance of info file load/save.
Info files required three copies in memory to be loaded (the original string, an ini representation, and the final info object). Not only was this memory inefficient but the Ini object does sequential scans when searching for keys making large files very slow to load.

This has not been an issue since archive.info and backup.info are very small, but it becomes a big deal when loading manifests with hundreds of thousands of files.

Instead of holding copies of the data in memory, use a callback to deliver the ini data directly to the object when loading. Use a similar method for save to avoid having an intermediate copy. Save is a bit complex because sections/keys must be written in alpha order or older versions of pgBackRest will not calculate the correct checksum.

Also move the load retry logic to helper functions rather than embedding it in the Info object. This allows for more flexibility in loading and ensures that stack traces will be available when developing unit tests.

Reviewed by Cynthia Shang.
2019-09-06 13:48:28 -04:00
..
auto v2.17: C Migrations and Bug Fixes 2019-09-03 16:39:32 -04:00
dtd Fix comment typos. 2019-08-26 12:05:36 -04:00
coding.xml Add coding standards for String constants. 2018-12-04 11:46:25 -05:00
documentation.xml Add openssl-devel install to documentation build in 711b3e67. 2019-01-30 22:02:42 +02:00
faq.xml Fix typos in the documentation. 2019-08-26 12:26:00 -04:00
index.xml Fix typos in the documentation. 2019-08-26 12:26:00 -04:00
metric.xml Add user guides for CentOS/RHEL 6/7. 2019-05-16 08:32:02 -04:00
reference.xml Add repo-s3-port option for setting a non-standard S3 service port. 2019-07-25 17:36:51 -04:00
release.xml Improve performance of info file load/save. 2019-09-06 13:48:28 -04:00
test.xml Fix typos in the documentation. 2019-08-26 12:26:00 -04:00
user-guide-index.xml Add user guides for CentOS/RHEL 6/7. 2019-05-16 08:32:02 -04:00
user-guide.xml Fix sudo missed in "Build pgBackRest as an unprivileged user". 2019-09-03 18:28:53 -04:00