4 ms·
The oj gem helps json generation a ton. The circular reference checks are still slow though.
by cheald 13y ago
The oj gem helps json generation a ton. The circular reference checks are still slow though.
- phamilton 13y agoIn my tests, serialization to a hash before oj writes it out to json is the slowest part. Doing 1000 records (~30 entries each, some with nested entries) to json via OJ and as_json results in less than 20% spent in OJ and the other 80% in generating the hash.