### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

Hi, I'm testing the image `localstack/localstack:0.14.5`, and setting `LEGACY_EDGE_PROXY=1` makes the following cleanup code much slower:

`for queue in client.list_queues()['QueueUrls']: client.purge_queue(QueueUrl=queue)`

`LEGACY_EDGE_PROXY=1`: `56.2 ms ± 2.9 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)`

`LEGACY_EDGE_PROXY=0`: `258 ms ± 17.6 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)`


### Expected Behavior

I expected performance to improve or not to regress.

### How are you starting LocalStack?

With a docker-compose file

### Steps To Reproduce

# Benchmark setup:

Docker-compose file:
```
version: "3.9"
services:
  localstack:
    image: localstack/localstack:latest
    environment:
      - DEFAULT_REGION=eu-west-1
      - SERVICES=s3,sns,sqs
      - LEGACY_EDGE_PROXY=1  # or 0
    ipc: host
```

```
# docker-compose rm -f localstack && docker-compose up localstack
```

```
import boto3

client = boto3.resource(
    'sqs',
    endpoint_url="http://localstack:4566/",
    region_name='eu-west-1',
    aws_secret_access_key="x",
    aws_access_key_id="x",
    use_ssl=False,
).meta.client

for i in range(10):
    client.create_queue(QueueName=str(i))

queues = client.list_queues()['QueueUrls']
assert len(queues) == 10
```

```
In [3]: %timeit for queue in client.list_queues()['QueueUrls']: client.purge_queue(QueueUrl=queue)
```

### Environment

```markdown
- OS: Ubuntu 22.04 LTS, Linux 5.15.0-40-generic #43-Ubuntu SMP Wed Jun 15 12:54:21 UTC 2022 x86_64 
- docker-compose 1.29.2
- Docker: 20.10.12, build 20.10.12-0ubuntu4
- LocalStack: 0.14.5
```


### Anything else?

Results don't improve over time, it's not a cold start issue.

https://github.com/localstack/localstack/issues/6398
""" A set of common handlers to build an AWS server application."""
from .. import chain
from . import analytics, auth, codec, cors, fallback, internal, legacy, logging, region, service
enforce_cors = cors.CorsEnforcer()
add_cors_response_headers = cors.CorsResponseEnricher()
content_decoder = codec.ContentDecoder()
parse_service_name = service.ServiceNameParser()
parse_service_request = service.ServiceRequestParser()
add_account_id = auth.AccountIdEnricher()
inject_auth_header_if_missing = auth.MissingAuthHeaderInjector()
add_region_from_header = region.RegionContextEnricher()
log_exception = logging.ExceptionLogger()
log_response = logging.ResponseLogger()
count_service_request = analytics.ServiceRequestCounter()
handle_service_exception = service.ServiceExceptionSerializer()
handle_internal_failure = fallback.InternalFailureHandler()
serve_custom_service_request_handlers = chain.CompositeHandler()
serve_localstack_resources = internal.LocalstackResourceHandler()
run_custom_response_handlers = chain.CompositeResponseHandler()
parse_service_response = service.ServiceResponseParser()
serve_edge_router_rules = legacy.EdgeRouterHandler()
serve_default_listeners = legacy.DefaultListenerHandler()
pop_request_context = legacy.pop_request_context
push_request_context = legacy.push_request_context