_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_subclasscheck
popping up in the memray flamegraph.Locally I've seen memray report that
_abc_subclasscheck
is 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:
issubclass
calls are necessary, certainly I don't see a rise in memory with just the last oneissubclass
on an abc is very poor indeed - this script takes 14seconds, if i switchABCMeta
totype
it takes 121ms!Your environment
The text was updated successfully, but these errors were encountered: