### 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
"""
    Serve the LocalstackGateway with the default configuration directly through hypercorn. This is mostly for
    development purposes and documentation on how to serve the Gateway.
    """
    from .serving.hypercorn import serve
    use_ssl = True
    port = 4566
    
    from localstack.utils.bootstrap import setup_logging
    setup_logging()
    if use_ssl:
        from localstack.services.generic_proxy import (
            GenericProxy,
            install_predefined_cert_if_available,
        )
        install_predefined_cert_if_available()
        _, cert_file_name, key_file_name = GenericProxy.create_ssl_cert(serial_number=port)
        ssl_creds = (cert_file_name, key_file_name)
    else:
        ssl_creds = None
    gw = LocalstackAwsGateway(SERVICE_PLUGINS)
    serve(gw, use_reloader=True, port=port, ssl_creds=ssl_creds)
if __name__ == "__main__":
    main()