Skip to content

Instantly share code, notes, and snippets.

@logrusorgru
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save logrusorgru/848683192f1549fbb021 to your computer and use it in GitHub Desktop.
Save logrusorgru/848683192f1549fbb021 to your computer and use it in GitHub Desktop.
ActiveRecord serialize, make it faster

ActiveRecord Serialize

serialize :column, JSON realy faster then standart YAML serialize

Small benchmark

class Some < ActiveRecord:Base
  serialize :column_y       # YAML slow
  serialize :column_j, JSON # fast
end

Start bench and watch it code for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment