4 ms·
ActiveModel::Serializer is really nice, but it doesn't seem particularly fast when large responses are involved - when we have 500+ comments to serialize it can
by jordanthoms 12y ago
ActiveModel::Serializer is really nice, but it doesn't seem particularly fast when large responses are involved - when we have 500+ comments to serialize it can take 400ms or more in the views code.
Is there a way to speed it up when building large responses?
- byroot 12y agoYou can add caching to it pretty easily. If you cache the objects independently and leverage memcache multiget you can get some very nice speedups. AMS have unfortunately no caching by default, and the development was stale for almost a year. The mailing list is active again since the last couple days, so it might get fixed soon.