Skip to content

Commit

Permalink
[ttx_diff] replace difflib with cdifflib
Browse files Browse the repository at this point in the history
difflib is not very efficient, and this has a significant impact on
runtime; for `NotoSansMono` I go from 18m of wall time to 13m16s.
  • Loading branch information
cmyr committed Jul 26, 2024
1 parent fe35b5a commit 4881e12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions resources/scripts/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ fontmake[repacker]==3.8.1
# our scripts import it directly, so we list it among the top-level requirements.
fonttools
lxml
cdifflib
2 changes: 1 addition & 1 deletion resources/scripts/ttx_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import shutil
import subprocess
import sys
from difflib import SequenceMatcher
from cdifflib import CSequenceMatcher as SequenceMatcher
from typing import MutableSequence


Expand Down

0 comments on commit 4881e12

Please sign in to comment.