Skip to content

Commit 2516403

Browse files
committed
Don't recompute 'all_ports_all_boards'
This looks modestly expensive, and it's trivial to cache it.
1 parent cab4063 commit 2516403

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/shared_bindings_matrix.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import re
2828
import subprocess
2929
import sys
30+
import functools
3031

3132
from concurrent.futures import ThreadPoolExecutor
3233

@@ -275,6 +276,7 @@ def lookup_setting(settings, key, default=''):
275276
key = value[2:-1]
276277
return value
277278

279+
@functools.cache
278280
def all_ports_all_boards(ports=SUPPORTED_PORTS):
279281
for port in ports:
280282

0 commit comments

Comments
 (0)