You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm upgrading from Peggy 2 to 3 and accordingly from ts-pegjs 3 to 4, but discovering that the performance of ts-pegjs has significantly dropped.
Previously with Peggy 2 and ts-pegjs 3:
Pass check.reportUndefinedRules took 16ms
Pass check.reportDuplicateRules took 1ms
Pass check.reportDuplicateLabels took 4ms
Pass check.reportInfiniteRecursion took 69288ms
Pass check.reportInfiniteRepetition took 4ms
Pass check.reportIncorrectPlucking took 1ms
Pass transform.removeProxyRules took 5ms
Pass transform.inferenceMatchResult took 23ms
Pass generate.generateBytecode took 61ms
Pass generate.generateTS took 117ms
✨ Done in 71.75s.
Pass check.reportUndefinedRules took 16ms
Pass check.reportDuplicateRules took 1ms
Pass check.reportDuplicateLabels took 5ms
Pass check.reportInfiniteRecursion took 68453ms
Pass check.reportInfiniteRepetition took 3ms
Pass check.reportIncorrectPlucking took 1ms
Pass transform.removeProxyRules took 5ms
Pass transform.inferenceMatchResult took 18ms
Pass generate.generateBytecode took 1685ms
Pass generate.generateJS took 475ms
Pass generate.generateParser took 33117ms !!!
✨ Done in 106.52s.
When I remove ts-pegjs plugin and just run Peggy 3, the performance is pretty close to Peggy 2:
Pass check.reportUndefinedRules took 16ms
Pass check.reportDuplicateRules took 2ms
Pass check.reportDuplicateLabels took 4ms
Pass check.reportInfiniteRecursion took 69878ms
Pass check.reportInfiniteRepetition took 3ms
Pass check.reportIncorrectPlucking took 2ms
Pass transform.removeProxyRules took 4ms
Pass transform.inferenceMatchResult took 18ms
Pass generate.generateBytecode took 1447ms
Pass generate.generateJS took 183ms
✨ Done in 73.97s.
While there are performance issues with Peggy itself (notably this reportInfiniteRecursion pass, which I have reported to peggyjs/peggy#457), the drop in performance of ts-pegjs is still very significant.
My initial guess is that this might be related to the changes to how ts-pegjs inferres type information. But really I have no clue.
The text was updated successfully, but these errors were encountered:
I'm upgrading from Peggy 2 to 3 and accordingly from ts-pegjs 3 to 4, but discovering that the performance of ts-pegjs has significantly dropped.
Previously with Peggy 2 and ts-pegjs 3:
(I do have an excessively large grammar file of about 6000 LOC)
Now with Peggy 3 and ts-pegjs 4:
When I remove ts-pegjs plugin and just run Peggy 3, the performance is pretty close to Peggy 2:
While there are performance issues with Peggy itself (notably this
reportInfiniteRecursion
pass, which I have reported to peggyjs/peggy#457), the drop in performance of ts-pegjs is still very significant.My initial guess is that this might be related to the changes to how ts-pegjs inferres type information. But really I have no clue.
The text was updated successfully, but these errors were encountered: