Skip to content

Plugin improvements #6164

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
  • Load plugin metadata in parallel
    for plugin in LemmyPlugins::get_or_init().0 {

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions