check_for_possible_redirect_loops runs in Theta( n^2 ) time
I was using this plugin on a project with ~250 redirects. I wrote an import script that made use of the create_redirect method to generate the redirects. After creating the redirects, the WordPress backend was "frozen". It seemed as though something was caught in an infinite loop.
After some searching I realized the problem was the check_for_possible_redirect_loops(). This method checks each redirect against every other redirect meaning it runs in Theta( n^2 ) time where n is the number of redirects. With 250 redirects, the contents of the loop in that function will be executed over 62,000 times.
Proposal: Add another filter "max_redirects_to_check_for_loops" or something to that effect. It should default to 50.
Is this project going to be dropping on VIP anytime soon? Seems like a pretty straightforward fix.
Nope. Not a VIP project. I simply modified the plugin by removing the method call for the project.
Just pushed up a change that disables this by default and adds a filter to enable it.
@tlovett1 it's useful to map issues to milestones, and close them when they're fixed :)
Ah ok. I'll try to do that.