297e91a Refactor calculation of file descriptor ranges to close.

Merged and Committed by bignose a year ago
    Refactor calculation of file descriptor ranges to close.
    
    When the range of candidate file descriptors is very large, the code that
    computes file descriptors to close when the daemon starts attempted to
    allocate a large amount of memory and took a long time to compute.
    
    Thanks to Alex Pyrgiotis for the timing test case.
    
    This change avoids that resource-intensive computation, and significantly
    improves the performance when importing the module and when starting the
    daemon.
    
    Thanks to Igor Kholopov for the implementation.
    
        
file modified
+14 -0
file modified
+22 -43
file modified
+0 -68