Open luismiv85 opened 5 years ago
@luismiv85 In both the AMS serialization, I believe you should do a .as_json
at the end else this would just instantiate the object and obviously be faster.
@Charizard I don't understand what you mean. In both case (json1 and json2) return a json. I think is not necessary .as_json
after use AMS. ¿Am I missing anything?
@luismiv85 You definitely need to call something like .as_json
or .serializable_hash
against the ActiveModel serializer… The only thing you're doing right now is initializing an instance of the serializer itself. No serialization is happening
Hi everyone! First of all, thanks for your contribution to Rails community. You guys are amazing.
We have an application in production and we have some problems with AMS performance. I'm checking fast_jsonapi to solve this :). I'm testing in my personal project to check the performance about FJA over AMS, but unfortunately I didn't find what I was expecting :( . Maybe I am doing my performance tests in a bad way and you can help me. Here is my benchmark:
Here are my serializers (ASM and FJA)
ASM:
FJA:
BENCHMARKS
With Benchmark ips:
With Benchmark measure:
Results:
Is anything wrong here? Thanks for helping the community, Cheers!