Commit 18c1f08
can: cache DBC parsing to speed up car interface tests (#2888)
* can: cache DBC parsing to speed up car interface tests
- Keep a class-level cache of parsed DBC files so each path is parsed once per process
- Return early in CANParser.update when no frames arrive to avoid needless work
- Cuts test_car_interfaces runtime significantly
* can: refactor DBC caching to use explicit factory function
* revert
* simple cache dbc
it's not at all used like a dataclass
---------
Co-authored-by: Shane Smiskol <[email protected]>1 parent 634922b commit 18c1f08
1 file changed
+3
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | | - | |
| 77 | + | |
77 | 78 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | 79 | | |
85 | 80 | | |
86 | 81 | | |
| |||
0 commit comments