The dereferencing function takes a very long time in the case of some complex examples. I faced many times use cases where I needed to stop the function after some time. Since dereference is a synchronous recursive function, it is not possible to stop it from outside. A 'time spent' check is needed to add to the crawl function.
I did a little modification locally to the dereference and crawl functions, to pass a timeout in the options of the referencing function.
The dereferencing function takes a very long time in the case of some complex examples. I faced many times use cases where I needed to stop the function after some time. Since dereference is a synchronous recursive function, it is not possible to stop it from outside. A 'time spent' check is needed to add to the crawl function.
I did a little modification locally to the dereference and crawl functions, to pass a timeout in the options of the referencing function.