Skip to content

Plugin improvements #6164

@Nutomic

Description

@Nutomic

Performance:

  • to improve performance dont call function_exists every time, but store a vec with all available plugin hooks
  • load plugins immediately on startup, so they can be initialized in the background while lemmy initializes the db, runs migrations etc

New features (there are a lot of possibilities):

  • move plugin configuration to a database table and support live reloading
  • add plugin ui for admins to lemmy-ui with:
    • list of installed plugins
    • config for each plugin
    • list of available plugins to install (hosted on join-lemmy.ml or federated)
    • plugin stats (which hooks active, how often called, how long execution time)
  • add more plugin hooks
  • http endpoints like GET /api/v4/plugin/*name*/ are forwarded to plugin hook http_call(req: HttpRequest): HttpResponse
  • plugins can make db queries via host function, eg for vote analysis ([0.19] Implement API for analytics of votes given by a person #5669)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions