Speedup `method_for_uri()`