Implement stream-based XML processing
lavamind - October 28, 2009 - 00:15
| Project: | Wordpress Import |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | lavamind |
| Status: | closed |
Jump to:
Description
All post data is loaded into memory before the batch process is launched. On large imports (ie, 1000+ posts), this can trigger a PHP memory exhaustion error.
Instead of loading the all XML data into memory, we should use stream-based XML processing to go through the WXR data. XMLReader, available in PHP 5.1 (and PHP 5.0 via PECL module), is a good candidate.

#1
Done and committed!
#2
Automatically closed -- issue fixed for 2 weeks with no activity.