[wp-trac] [WordPress Trac] #55069: Optimize POMO_FileReader.read_all() using stream_get_contents()
WordPress Trac
noreply at wordpress.org
Sat Feb 12 14:13:30 UTC 2022
#55069: Optimize POMO_FileReader.read_all() using stream_get_contents()
---------------------------+-----------------------------
Reporter: maxkellermann | Owner: SergeyBiryukov
Type: enhancement | Status: accepted
Priority: normal | Milestone: 6.0
Component: I18N | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: performance
---------------------------+-----------------------------
Comment (by SergeyBiryukov):
Thanks for the patches!
Looks like [attachment:"0002-class-wp-filesystem-direct-remove-
unnecessary-is_dir.patch"] is the only one left. My concerns here:
* The `::is_dir()` and `::is_readable()` methods call the `is_dir()` and
`is_readable()` PHP functions, respectively, with the error suppression
operator (`@`). The subsequent `dir()` call does not have it. If we remove
these checks, would that lead to PHP warnings on some installs which had
none previously, for example due to `open_basedir` restrictrion? Seems
like this could use some testing.
* The `WP_Filesystem_SSH2::dirlist()` method has a similar block, does it
need the same change?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55069#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list