Opened 6 years ago
Last modified 8 days ago
#33296 new enhancement
Allow sites to skip a query in meta_form() that can delay loading the page
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.3 |
Component: | Administration | Keywords: | has-patch needs-refresh needs-unit-tests |
Focuses: | performance | Cc: |
Description
Follow-up to #24998 (and its duplicates #32361, #32449). See also #18979.
Edit post loads slowly on sites with large tables. Sites should be able to bypass the meta drop-down query. I'm attaching a simple patch using the existing filter postmeta_form_limit
.
Some sites do not need the drop-down, or have too many custom metas to make a drop-down useful. The drop-down is great for me though. I can easily add features without creating a custom meta box. Once an option is in the drop-down, my authors know it is available.
Attachments (1)
Change History (6)
This ticket was mentioned in Slack in #core by peterwilsoncc. View the logs.
8 days ago
#5
@
8 days ago
- Keywords needs-refresh needs-unit-tests added
This was discussed in a triage session today.
Avoiding connecting to the database for a LIMIT 0
query makes sense.
For sites that do set the limit to display zero keys using the postmeta_form_limit
filter, the MySQL optimizer will skip the reading the table so the sub-optimal where clause won't slow things down.
33296.patch no longer applies cleanly so adding the needs-refresh keywords.
By the way, a workaround is
foreach ( get_post_types() as $type ) remove_post_type_support( $type, 'custom-fields' );
. But my patch is sensible and keeps the meta box.