#5357 closed enhancement (fixed)
wxr import: don't load the whole file at once
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
The wxr importer currently loads all posts into a large array before processing them. That makes large imports impossible on servers with a small memory limit.
The enclosed patch refactors import/wordpress.php to keep only one post at a time in memory. I've keep most of the original code intact to minimize breakage. It's no faster or slower than before. There are other optimizations that could be made but this is a necessary first step.
Unit tests are in http://svn.automattic.com/wordpress-tests/wp-testcase/test_import_wp.php
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
The sample export files used for unit testing are here if anyone wants to confirm those tests by hand: http://svn.automattic.com/wordpress-tests/wp-testdata/export/
big-export.xml has 500 posts with comments.