Title: Idea: New v3 opt-in serialization format to save space · Issue #366 · igbinary/igbinary · GitHub
Open Graph Title: Idea: New v3 opt-in serialization format to save space · Issue #366 · igbinary/igbinary
X Title: Idea: New v3 opt-in serialization format to save space · Issue #366 · igbinary/igbinary
Description: Use version \x00\x00\x00\x03 when this is stable Avoid wasting space emitting key representations when array_is_list, i.e. when array keys are consecutive integers starting from 0 (have a fallback to start emitting unexpected keys with d...
Open Graph Description: Use version \x00\x00\x00\x03 when this is stable Avoid wasting space emitting key representations when array_is_list, i.e. when array keys are consecutive integers starting from 0 (have a fallback ...
X Description: Use version \x00\x00\x00\x03 when this is stable Avoid wasting space emitting key representations when array_is_list, i.e. when array keys are consecutive integers starting from 0 (have a fallback ...
Opengraph URL: https://github.com/igbinary/igbinary/issues/366
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Idea: New v3 opt-in serialization format to save space","articleBody":"- Use version \\x00\\x00\\x00\\x03 when this is stable\r\n- Avoid wasting space emitting key representations when `array_is_list`, i.e. when array keys are consecutive integers starting from 0 (have a fallback to start emitting unexpected keys with different values, if needed)\r\n- Allow more than one reference group to the same php value to be distinctly unserialized (e.g. `$x = new stdClass; $y = $x; igbinary_serialize([\u0026$x, \u0026$x, \u0026$y, \u0026$y]);`)\r\n (TODO: I forget the exact issue. Was that fixed already for the general case, or was the issue mixes of references and non-references)\r\n- Shorter representations for 1-character interned strings\r\n- Shorter representations for private properties of serialized class `\\x00$classname\\x00$propname` (and protected properties `\\x00*\\x00$propname`) (keys for parent classes and traits would be serialized normally)\r\n- Don't bother creating string ids for empty strings (EDIT: that's already part of the v2 design?) and 1-character strings that would already be interned in modern php versions (support reusing per-request in RINIT in igbinary itself if practical for php versions without ZSTR_CHAR guaranteed to exist)\r\n\r\nOpt-in can be done on per-serializer settings, to allow any migrations (e.g. redis, memcached) to be done separately.\r\n\r\nThe unserializer should recognize v3 from the header\r\n\r\n\r\n\r\nRelated to https://github.com/phpredis/phpredis/issues/2194\r\n\r\nUpdates (October 19):\r\n\r\nImplementation is broken/incomplete and the v3 serialization format will be changed, found on the fork branch `igbinary-v3-format`\r\n\r\n- Shorter representations for very small non-negative integers (e.g. 0..7 can be X+(0..7)) is an idea I've seen in several other binary protocol formats, useful for `['key' =\u003e 1, 'x' =\u003e 0]` where integers are used instead of booleans, or just from most integers being small (e.g. counts) when averaged out over common use cases\r\n- Still haven't implemented for serializing lists\r\n- Still haven't finished adding a way to represent creating a new reference group to the same php object for the general case\r\n- Haven't benchmarked this yet\r\n","author":{"url":"https://github.com/TysonAndre","@type":"Person","name":"TysonAndre"},"datePublished":"2022-10-18T05:25:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/366/igbinary/issues/366"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5de162be-0c67-38bc-6add-92c9585f31a7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C2C2:14919D:61F7535:7F556B4:697E1A59 |
| html-safe-nonce | 7ef766f713ed6df3ab7f88136363357cb10e3f383b26fe8c79183a26a4f14daa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMkMyOjE0OTE5RDo2MUY3NTM1OjdGNTU2QjQ6Njk3RTFBNTkiLCJ2aXNpdG9yX2lkIjoiNDE4MDMxNTA0ODQ3MzY2NDA4OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2d41699642712f9a766581f3efae8f00f27bf71aa5f2a032ca94d7c162a0ee9c |
| hovercard-subject-tag | issue:1412592536 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/igbinary/igbinary/366/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1ab44590e68bfabefc9af37e545b34da8959098d9d36e6efd95c91e833341097/igbinary/igbinary/issues/366 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1ab44590e68bfabefc9af37e545b34da8959098d9d36e6efd95c91e833341097/igbinary/igbinary/issues/366 |
| og:image:alt | Use version \x00\x00\x00\x03 when this is stable Avoid wasting space emitting key representations when array_is_list, i.e. when array keys are consecutive integers starting from 0 (have a fallback ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | TysonAndre |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/igbinary/igbinary git https://github.com/igbinary/igbinary.git |
| octolytics-dimension-user_id | 555243 |
| octolytics-dimension-user_login | igbinary |
| octolytics-dimension-repository_id | 1237364 |
| octolytics-dimension-repository_nwo | igbinary/igbinary |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 155943 |
| octolytics-dimension-repository_parent_nwo | phadej/igbinary |
| octolytics-dimension-repository_network_root_id | 155943 |
| octolytics-dimension-repository_network_root_nwo | phadej/igbinary |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width