Skip to content

Reuse last resource from url dispatch table #2586

Closed
@asvetlov

Description

If name and path is the same -- add a route to existing resource instead of creating a new one.

E.g.

router.add_get('/', ...)
router.add_post('/', ...)

should create the single resource if path and name are the same.

It reduces resources table size and boosts url lookup if handlers for the same url is grouped together.

The change is easy, Pull Request is welcome.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions