Skip to content

Improve performance of shops search by address #5180

@alexsegura

Description

@alexsegura

Currently search by address is implemented by looping through each enabled shop, and check if the searched address matches its deliveryPerimeterExpression (see RestaurantFilter.php).

This is implemented like this, because restaurants can be either configured with a zone (a polygon) or a distance (a radius around the restaurant).

Of course, this is highly inefficient. Even if all restaurants are configured with the same zone, it would still evaluate each restaurant individually.

Instead, it should be possible use Tile38 to store all restaurants as objects representing their zone or circle, and check if the point (the address searched) is inside.

One problem may be that Tile38 does not support circles, so we might need to emulate circles using this technique.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions