mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-04-30 22:30:46 +08:00
This PR uses MessagePack instead of JSON for serializing our cookies. MessagePack is almost as fast as Marshal but without the security issues. It’s also able to serialize more objects than JSON (like Time, Symbol, etc.). As it’s a binary format, it takes less space than JSON, sometimes half less. Finally, MessagePack isn’t Ruby-specific and implementations exist in every existing language. Regarding the cookies Discourse is using, we can see a small improvement on the `_forum_session` one when it’s almost empty (around 2%), but the more things are put into it, the more we’ll see savings. For the `_t` cookie, we’re saving around 20% for free. |
||
|---|---|---|
| .. | ||
| active_record_attribute_methods.rb | ||
| active_record_disable_serialization.rb | ||
| ams_include_without_root.rb | ||
| copy_file.rb | ||
| cose_rsapkcs1.rb | ||
| fast_image.rb | ||
| inflector_backport.rb | ||
| ip_addr.rb | ||
| message_pack_extensions.rb | ||
| net_http.rb | ||
| net_http_header.rb | ||
| propshaft_patches.rb | ||
| rails_multisite.rb | ||
| request_server_session.rb | ||
| rspec_mocks_from_described_class.rb | ||
| safe_buffer.rb | ||
| safe_migrations.rb | ||
| schema_migration_details.rb | ||
| sidekiq.rb | ||
| translate_accelerator.rb | ||
| web_push_request.rb | ||