Opened 15 years ago
Closed 14 years ago
#14245 closed defect (bug) (duplicate)
Remove create_function from preg_replace_callback to improve memory usage
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Performance | Keywords: | has-patch |
Focuses: | Cc: |
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
@
15 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.
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.