Closed antoninbas closed 7 years ago
@@ Coverage Diff @@
## master #80 +/- ##
==========================================
+ Coverage 97% 97.03% +0.02%
==========================================
Files 10 10
Lines 1605 1620 +15
==========================================
+ Hits 1557 1572 +15
Misses 48 48
Impacted Files | Coverage Δ | |
---|---|---|
p4c_bm/gen_json.py | 98.02% <100%> (+0.03%) |
:white_check_mark: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 91c7add...83623cf. Read the comment docs.
For more complex parser definitions with multiple tag stacks, the run time of the algorithm which builds the header graph (in order to run the topological sorting needed to program the deparser) was "exploding". To fix this, I implemented a caching approach to avoid further processing when the recursion visits the same parser state with the same processing state (previous node + tag stacks indices) again. This reduced the run time dramatically.