_abc._abc_subclasscheck has very poor performance and (I think) a memory leak
#92810
Labels
_abc._abc_subclasscheck has very poor performance and (I think) a memory leak
#92810
Bug report
I'm been hunting a memory leak in pydantic and I keep seeing
_abc_subclasscheckpopping up in the memray flamegraph.Locally I've seen memray report that
_abc_subclasscheckis using 2.8GB of memory in some cases!I can't get anything that bad in a minimal example, but I have the following:
A few things to note:
issubclasscalls are necessary, certainly I don't see a rise in memory with just the last oneissubclasson an abc is very poor indeed - this script takes 14seconds, if i switchABCMetatotypeit takes 121ms!Your environment
The text was updated successfully, but these errors were encountered: