Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#17112 closed enhancement (fixed)

Remove default-embeds.php

Reported by: nacin's profile nacin Owned by:
Milestone: 3.2 Priority: normal
Severity: normal Version:
Component: Performance Keywords:
Focuses: Cc:

Description

default-embeds.php is a file loaded conditionally, which triggers an extra sysopen call. This also goes for default-widgets.php, but that's a much larger file.

On the other hand, if we move the single function, wp_embed_handler_googlevideo(), to wp-includes/media.php, we can improve some performance. I don't think we plan to add too many more default embeds, so this seems pretty safe.

We can still only call wp_embed_register_handler() if the load_default_embeds filter returns true (found in wp_maybe_load_embeds(), attached to plugins_loaded).

Only issue could be someone returning false through the filter then treating it as a pluggable function, stealing its name, but I doubt we'd see that anywhere. At worst, we could add a function_exists() check (still better than what we have) or simply rename the function, as embed handlers are identified by a unique ID, not the function name.

Change History (5)

#1 @nacin
14 years ago

  • Keywords 2nd-opinion removed

#2 @nacin
14 years ago

As videos will be hosted on Google Video indefinitely, or at least until they're migrated to YouTube or something, I'm leaving the handler and shifting some things around.

#3 @nacin
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [17751]) Remove default-embeds.php. fixes #17112.

#4 @dd32
14 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

As videos will be hosted on Google Video indefinitely,

Not so, As the article linked above mentions, and the Google Video email's say:

Later this month, hosted video content on Google Video will no longer be available for playback. Google Video stopped taking uploads in May 2009 and now we’re removing the remaining hosted content. We've always maintained that the strength of Google Video is its ability to let people search videos from across the web, regardless of where those videos are hosted. And this move will enable us to focus on developing these technologies further to the benefit of searchers worldwide.

On April 29, 2011, videos that have been uploaded to Google Video will no longer be available for playback. We’ve added a Download button to the video status page, so you can download any video content you want to save. If you don’t want to download your content, you don’t need to do anything. (The Download feature will be disabled after May 13, 2011.)

We might as well remove it entirely

#5 @nacin
14 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Yeah, but they later reversed that. Now they're working on a migration to YouTube, and there's no timetable or deadline.

http://googlewebmastercentral.blogspot.com/2011/04/update-on-google-video-finding-easier.html

Note: See TracTickets for help on using tickets.