Opened 11 years ago
Closed 4 years ago
#33296 closed enhancement (wontfix)
Allow sites to skip a query in meta_form() that can delay loading the page
| Reported by: | kitchin | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Administration | Version: | 4.3 |
| Severity: | normal | Keywords: | has-patch needs-refresh needs-unit-tests |
| Cc: | Focuses: | performance |
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 (7)
This ticket was mentioned in Slack in #core by peterwilsoncc. View the logs.
6 years ago
#5
@
6 years 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.
#6
@
4 years ago
- Resolution → wontfix
- Status new → closed
This seems like a near duplicate of #33885, which was closed "as wontfix with the goal of deprecating meta_form" (see comment:99:ticket:33885).
I think it's reasonable to do the same here.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.