views:

72

answers:

2

I'm writing a Rails app and I've partially integrated in this nice little patch to the in line ajax editor: http://inplacericheditor.box.re/

The problem is, on that page I have tinymce, prototype and scriptaculous included. In Firefox at least there's a big lag when all this stuff is loading. I was hoping to fix it by compressing the files so I checked out a plugin for rails called Smurf. It seemed to do what it was supposed to do nicely, but it choked on the little patch files that are included with the Ajax editor thing. THe patch files look like this:

Object.extend(Ajax.InPlaceEditor.prototype, {
  handleAJAXFailure: function(transport)

Alternatively, should I just be catching them instead of worrying about minfying them? I know I'm running on development and that Apache would maybe be handling serving the js files differently..It just seems like a lot of things to serve on one page.

A: 

Can you configure your plugin to not touch the patch files?

Also, remember that getting Apache to gzip the files prior to sending them with mod_deflate helps a LOT - saving usually 50% or so. (Citation needed)

nickf
A: 

Minification doesn't bring much improvement over gzip + proper caching strategy.

Assets caching is already built into Rails, so you would need to turn that on. Gzip can be set up in your server configuration.

kangax