Opened 16 years ago
Closed 16 years ago
#14245 closed defect (bug) (duplicate)
Remove create_function from preg_replace_callback to improve memory usage
| Reported by: | nacin | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Performance | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
On large imports, a create_function() call in wp_kses_split() in particular causes memory issues pretty quickly.
Let's continue to move away from create_function calls as callbacks. Patch attached handles most instances.
Attachments (3)
Change History (8)
#2
@
16 years ago
Just added a patch that solves the reported memory issue. Compared to Nacins suggestion it does not re-introduced an already deprecated function (!) nor does it change the existing function header of wp_kses_split2().
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Maybe using a static function does the job as well and saving the global namespace function starting with subjective stuff like funky? Not that I like create_function that much, but well, it was in use anyway and it's for this callback only.
Second patch looks being an upload in error.