You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
writeGlyph is called per-glyph, I don't see an easy way to fix this. Changing the call to set(self._existingFileNames.values()) only makes it slower because now you make a set every time. And I'm not sure the list is guaranteed to be ordered?
The text was updated successfully, but these errors were encountered:
I think GlyphSet._existingFileNames needs to become a set. The only time its keys are used is in GlyphSet.deleteGlyph, and unless I'm missing something, I think we can write self._existingFileNames.remove(self.contents[glyphName]) there, instead of the current del self._existingFileNames[fileName].
(In other words, I think it's userNameToFileName()'s caller's responsibility to pass a set-like thing for the existing argument.)
Profiling https://github.com/madig/noto-amalgamated/blob/main/amalgamate-noto.py shows that ~2 mins of ~10 mins are spent in userNameToFileName, specifically
fonttools/Lib/fontTools/ufoLib/filenames.py
Line 101 in df2916a
since
existing
is derived fromself._existingFileNames.values()
infonttools/Lib/fontTools/ufoLib/glifLib.py
Line 461 in df2916a
writeGlyph
is called per-glyph, I don't see an easy way to fix this. Changing the call toset(self._existingFileNames.values())
only makes it slower because now you make a set every time. And I'm not sure the list is guaranteed to be ordered?The text was updated successfully, but these errors were encountered: