-
Notifications
You must be signed in to change notification settings - Fork 571
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
Normalize order of attributes #4
Comments
We need to group most used attributes of each elements together. Can it be computed, maybe... |
Do you mean computing gzip savings? Which order results in better compression? |
Once the gzip benchmark stuff lands, it'll be much easier to see whether efforts in this area yield size savings. |
We can try simplistic approaches like alphabetizing attributes, or more sophisticated approaches like identifying which tag/attribute combos occur most-often. For example, determining that |
Yeah, I imagine after gzip it's probably mostly insignificant, since afaik gzip already does some sort of optimal reordering?
Yep. Sounds reasonable. |
So if I understand correctly, we scan through a given tag name collecting statistics, then re-order the attributes by descending frequency? Most of the time only shuffling the most frequently-used attribute to the front would suffice, but then if that attribute happens to have the same value across then we can form a longer chain if we perform reordering on the rest as well... |
Sounds about right :) |
This might result in better gzip compression.
The text was updated successfully, but these errors were encountered: