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 647
    • Issues 647
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 86
    • Merge requests 86
  • 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
  • !3419

Recompilation speedup: Pleroma.Web.get_api_routes/0 --> Pleroma.Web.Router.get_api_routes/0

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Alex Gleason requested to merge cycles-router-api-routes into develop May 28, 2021
  • Overview 2
  • Commits 2
  • Pipelines 1
  • Changes 4

#2651 (closed)

This MR moves the function get_api_routes/0 out of Web and into Router.

This change is significant AF and I'm not even gonna share a screenshot, just click the link: https://www.diffchecker.com/EtfcQmay

It removes a cycle and cuts down the size of nearly ALL other cycles.

The problem is that making Web depend on Router causes a lot of cycles, since most of the stuff in Router depends back on Web (controllers, plugs, etc) at compile time. It's important we keep Web clean of any deps as it will certainly create cycles otherwise.

I believe putting this function in Router is far more canonical than putting it in Web, so I consider this a code quality improvement in addition to improving recompilation performance.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: cycles-router-api-routes