- putting javascript in the header is very slow. it blocks the whole page download. see http://developer.yahoo.com/performance/ ... #js_bottom
- loading all of wordpress a second time just for some javascript include is bad. This makes an extra network request to load the javascript over and over _every time the user visits a page_! Additionally, this makes offloading the javascript to a CDN impossiple.
To fix this, set variables inside an inline script tag. make any included javascript *static* to avoid having to parse the whole document with php. - once the external script tag is in the footer, load it after the DOM is ready.
- combine and minify CSS and javascript. this should definitely be done for all elements except those that are set by configuration.
- Don't assume the plugin will be at get_bloginfo('wpurl')."/wp-content/plugins/featured-content-gallery/". it will not always be there. Use __FILE__ and provide options to override the CSS and javascript locations... same for the options page.
- consider using the wordpress queuing system to make sure mootools isn't accidentally loaded by another plugin or something of the sort.
- consider generating a list of the posts to be featured and caching it, inserting it via external script, json, or inline if necessary. use this to pick a random post to feature in javascript, thus saving lots of querying and allowing the plugin to still pick a new post when supercache is in use.
Performance improvements necessary...
6 posts • Page 1 of 1
Performance improvements necessary...
Here's a list of things that make this plugin completely useless on a production site... if desired I can provide patches for these issues...
- mjc
- Posts: 2
- Joined: Wed May 06, 2009 10:44 pm
- Thank you for using the Featured Content Gallery Forum
Re: Performance improvements necessary...
Hey MJC,
I'm not a PHP wizard like you, so I'm glad you posted this... It helps me understand why my site takes such a long time to load
I guess FCG is not very efficient, and having a huge Mootools file loaded on top of that, plus what you've listed here doesn't help...
Thanks for the info, though...
I'm not a PHP wizard like you, so I'm glad you posted this... It helps me understand why my site takes such a long time to load
Thanks for the info, though...
- MichaelM
- Posts: 2
- Joined: Tue May 05, 2009 12:36 pm
Re: Performance improvements necessary...
mootools is not that huge of a deal, the biggest issue of all of these is the javascript loading a whole copy of wordpress. I can work on a patch for that specific thing tonight sometime 
- mjc
- Posts: 2
- Joined: Wed May 06, 2009 10:44 pm
Re: Performance improvements necessary...
I would pay you to release this patch to the public. I need something to speed this thing up.
- remotay
- Posts: 6
- Joined: Fri Jan 23, 2009 9:51 pm
Re: Performance improvements necessary...
Hi, great issues list. I've been trying to utilize a handful of Wordpress optimization plugs that are supposed to moved javascript to the bottom per YSlow recommendations but this always breaks FCG. Does anyone know of a plug or way to make this happen?
Thanks.
Thanks.
- ebutoto
- Posts: 2
- Joined: Tue Dec 29, 2009 1:17 pm
Re: Performance improvements necessary...
Please, I need this.
Can you walk me through these changes?
Can you walk me through these changes?
- alintx
- Posts: 1
- Joined: Fri Oct 23, 2009 6:41 am
6 posts • Page 1 of 1
Return to Development, Improvement, and Conflicts
Who is online
Users browsing this forum: No registered users and 1 guest









