-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increments #7
Comments
I just translated a real file (971 bytes) using increments and was able to reduce the usual output of mendoza from 587 down to 515 bytes (60% to 53%). For me this is a promising result, don't you think? |
This is very interesting! We're storing Mendoza patches as binary, which means that we won't save anything particular with this change, but we're transferring it to the browser with JSON and here it would matter. Introducing these opcodes also means we'll have to think about how we version it. If we add this in e.g. v1.1.0 I'd still like it be able to generates patches which are compatible with v1.0.0. It should probably be an opt-in option. |
I'm still evaluating the field, may I ask how exactly you store it, that it does not make a difference? |
I also realize another thing here: When dealing with objects and arrays it uses the [
17,
{
"rx": {
"bytes": 452949875,
"packets": 653759
}
},
"traffic",
6,
2,
0,
13579.39,
15
] If we make a composite key for [
17,
{
"rx": {
"bytes": 452949875,
"packets": 653759
}
},
"traffic",
24,
2
13579.39
] |
After fiddling with mendoza patches, I really appreciate the format.
Observing my deltas I found several of my values changing a little over time.
Especially the numeric fields have a rather obvious optimization potential:
Often the numbers do not diff by much.
Maybe a useful addition of ObjectSetFieldValue would be ObjectIncrementFieldValue, which would only allow numeric (not necessarily positive) values as argument.
The differ would compare whether the patch step was shorter if the increment was used instead of set value.
left
right
Currently a patch for this looks like this (80):
After implementing
24: Increment
and
25: ObjectIncrementFieldValue
A patch could then look like this (70 chars):
Looking at
ArrayAppendValue
andStringAppendString
this would be a suitable extension of the current format.What do you think about this?
The text was updated successfully, but these errors were encountered: