Make WordPress Core

Opened 8 years ago

Closed 11 months ago

#33296 closed enhancement (wontfix)

Allow sites to skip a query in meta_form() that can delay loading the page

Reported by: kitchin's profile kitchin 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)

33296.patch (1.3 KB) - added by kitchin 8 years ago.

Download all attachments as: .zip

Change History (7)

@kitchin
8 years ago

#1 @MikeHansenMe
8 years ago

  • Keywords has-patch added

#2 @kitchin
8 years ago

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.

#3 in reply to: ↑ description @kitchin
8 years ago

Correction: Follow-up to #24498 not #24998

This ticket was mentioned in Slack in #core by peterwilsoncc. View the logs.


2 years ago

#5 @peterwilsoncc
2 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 @desrosj
11 months ago

  • Resolution set to wontfix
  • Status changed from new to 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.

Note: See TracTickets for help on using tickets.