Skip to content
المشاريع

حول

High Performance JSON Serialization for ActiveRecord & Ruby Objects

أدوات التطوير

كيف تُقاس هذه الأرقام

النمو المقاس للنجوم

خلال 24 ساعة
٠
خلال 7 أيام
؜-١
خلال 15 يومًا
؜-١
خلال شهر
جارٍ جمع السجل

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل

Panko

Build Status

Panko is a library which is inspired by ActiveModelSerializers 0.9 for serializing ActiveRecord/Ruby objects to JSON strings, fast.

Panko is pure Ruby: no native extension, nothing to compile at install. It needs Ruby 3.4+ and ActiveSupport 7.2+. To achieve its performance:

  • Code generation: each serializer is compiled once into specialized, straight-line Ruby, so serialization runs no per-record introspection and YJIT optimizes it well.
  • Auto-specialization: the first time a serializer meets an ActiveRecord class, Panko compiles a variant hard-wired to that model, reading values straight from its attribute storage.
  • Oj: JSON is written incrementally using Oj::StringWriter.

To dig deeper about the performance choices, read Design Choices.

Coming from 0.8 (the C extension)? Read Upgrading from 0.8.

Support

License

The gem is available as open source under the terms of the MIT License.

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…