This module does things in hook_init() which it only needs to do if the current page is actually showing a player.

Don't.

Comments

univate’s picture

The biggest overheads here is checking for the existence of specific files on the server, the issue #880050: Configurable location for mp3players external files. fixes that.

univate’s picture

removing duplicate post

univate’s picture

removing duplicate post

joachim’s picture

You should only check for the presence of files in hook_requirements; the rest of the time it's safe to assume they are there.

See jquery_ui, for example.

univate’s picture

joachim’s picture

The patch over there moves the file checking, which is good. But the drupal_add_js() calls should be moved to the theme function rather than be always loaded in hook_init() -- might as well done be here as a follow-up.

univate’s picture

Title: don't use hook_init() » Move drupal_add_js to theme function

giving this issue a meaningful title

jdelaune’s picture

Status: Active » Fixed

Committed to dev. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.