When migrating to Ocaml 5.0.0, the Pyre team encountered a major slowdown in Gc.stat performance when we were type checking a large Python codebases. In that specific run it went from taking well under 1 second to about 50.
We moved the call - which was used for telemetry - behind a --debug flag as a mitigation:
facebook/pyre-check@91eba63
For our use case it turns out we could use Gc.quick_stat which is better, but it was still suggested in
https://discuss.ocaml.org/t/ocaml-5-0-0-in-pyre-mostly-smooth-sailing-gc-stat-regression/11205
that we file a ticket in case the magnitude of the slowdown comes as a surprise.
It appeared to me that when type-checking smaller codebases there was no visible regression, so I think that the ocaml process has to be using quite a bit of ram (likely several GB) before the problem appears. Unfortunately there is no open-source codebase I know of large enough to reproduce the slowdown inside of Pyre.
When migrating to Ocaml 5.0.0, the Pyre team encountered a major slowdown in
Gc.statperformance when we were type checking a large Python codebases. In that specific run it went from taking well under 1 second to about 50.We moved the call - which was used for telemetry - behind a
--debugflag as a mitigation:facebook/pyre-check@91eba63
For our use case it turns out we could use
Gc.quick_statwhich is better, but it was still suggested inhttps://discuss.ocaml.org/t/ocaml-5-0-0-in-pyre-mostly-smooth-sailing-gc-stat-regression/11205
that we file a ticket in case the magnitude of the slowdown comes as a surprise.
It appeared to me that when type-checking smaller codebases there was no visible regression, so I think that the ocaml process has to be using quite a bit of ram (likely several GB) before the problem appears. Unfortunately there is no open-source codebase I know of large enough to reproduce the slowdown inside of Pyre.