From 25164030e228b36f47a6caabdd084c417c061c80 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 14 Oct 2022 11:06:35 -0500 Subject: [PATCH] Don't recompute 'all_ports_all_boards' This looks modestly expensive, and it's trivial to cache it. --- docs/shared_bindings_matrix.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/shared_bindings_matrix.py b/docs/shared_bindings_matrix.py index 196415ca2f..761e3e29f2 100644 --- a/docs/shared_bindings_matrix.py +++ b/docs/shared_bindings_matrix.py @@ -27,6 +27,7 @@ import pathlib import re import subprocess import sys +import functools from concurrent.futures import ThreadPoolExecutor @@ -275,6 +276,7 @@ def lookup_setting(settings, key, default=''): key = value[2:-1] return value +@functools.cache def all_ports_all_boards(ports=SUPPORTED_PORTS): for port in ports: