In edge rails, serialized attributes are saved every time no matter
they are changed or not:
# Serialized attributes should always be written in case
# changed in place.
update_without_dirty(changed | (attributes.keys &
In out app, User model has a serialized attribute friend_ids, which is
the id array of the user’s friends (used to be a friendships table,
but when that table grew to tens of millions of records, we refactored
it to a User’s attribute). The User model in our app is saved very
frenquently, and many users have more than 1 handred friends, so the
friend_ids may has 1kB long. Some of my colleages opposed to use
serialized friend_ids, and suggested to used a comma separated string
instead because saving 1kB each time would have performance issue.