You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some serializers or associations are simple enough to use ActiveRecord's pluck function to retrieve objects. pluck is much faster than retrieving objects with plain ActiveRecord.
I created a gem, Plucker Serializer, that uses this technique to improve performance. It also has built-in single object and collection caching.
Benchmarks show that plucking can improve memory consumption and throughput, especially for large collections.
Adding custom type casting and using Oj::StringWriter like Panko does in addition with this technique could really boost performance in my opinion.
The text was updated successfully, but these errors were encountered:
Some serializers or associations are simple enough to use ActiveRecord's
pluck
function to retrieve objects.pluck
is much faster than retrieving objects with plain ActiveRecord.I created a gem, Plucker Serializer, that uses this technique to improve performance. It also has built-in single object and collection caching.
Benchmarks show that plucking can improve memory consumption and throughput, especially for large collections.
Adding custom type casting and using Oj::StringWriter like Panko does in addition with this technique could really boost performance in my opinion.
The text was updated successfully, but these errors were encountered: