Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pleroma pleroma
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 645
    • Issues 645
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 88
    • Merge requests 88
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PleromaPleroma
  • pleromapleroma
  • Merge requests
  • !3409

Switch to aliasing `Router.Helpers` instead of importing

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Alex Gleason requested to merge alias-router-helpers into develop May 19, 2021
  • Overview 2
  • Commits 2
  • Pipelines 1
  • Changes 21

In my research of speeding up recompilation (#2651 (closed)) the first thing most sources recommend is switching Phoenix router helpers to be an alias instead of an import.

The gains here are marginal, but I still felt it was worth doing because:

  1. It makes router helpers a runtime dependency instead of an export dependency.
  2. It makes the code a bit easier to understand. Instead of functions like o_auth_path() floating in space, Routes.o_auth_path() is more explicit.
  3. It rules this out as a source of recompilation slowness.
  4. It's the new default way Phoenix does it.
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: alias-router-helpers