-
Notifications
You must be signed in to change notification settings - Fork 36
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
[idea] hashing for data comparison #261
Comments
FYI Adobe ufoTools uses the HashPointPen to store a hash and not rehint an outline that hasn't changed. |
Thank you, my idea is actually based on that pen. I'm still not sure here was the right place to bring it up or I should take it to |
I recommend using a representation factory for this. The representation system will handle creation of the hash when called, store it internally for speed and destroy it when the glyph changes. Documentation on this is here. |
Thank you Tal, seems super interesting! I will try to see how can I use that. |
I understand that since glyphs and data inside a ufo are mutable, the idea of hashing is counter-intuitive. But I was wondering if there was a way to make a hash of a glyph to compare if it has changed, then it's possible to reduce the compile time in ufo2ft by not compiling all the glyphs or even not all the binary tables. When a hash method is called, the glyph data is converted into tuples and then its hash is returned. This could also be used in more places to make sure if a part of the font has been changed on disk.
I've been doing a similar thing to create a JIT compiler but it does not use hashes. instead, I use the notifications to make changes to the binary. Do you think if I start something like this, is any PR acceptable or the idea is not sensible?
The text was updated successfully, but these errors were encountered: