I made a pull request for this that appears to work fine for my 10x smaller test case (reduces tear-down time from over 45 seconds to over 7). It implements my second earlier sketch (add a vector of search fingers, to eliminate searches):
https://github.com/python/cpython/pull/13612 It would be good to know how it works on the OP's 10x larger test case, which requires a machine with over 80 GB of RAM. Hoping it will reduce tear-down time from hours to minutes (they have about a billion `Node` objects, so tear-down time will never be trivial). It would also be good to get a code review, if you have the time and inclination. Thanks! _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com