Skip to content

jooby-run: redo classloader strategy #3018

@jknack

Description

@jknack

jooby-run (maven/gradle) run on top of jboss-modules. As today it uses a single classloader that contains the project classpath + any project dependency (jars).

Every time a change is done, jooby restarts the application, drop the classloader and creates a new classloader. This works OK but consumes memory due it must load all classes again.

Next release will change this by using two classloaders:

  • main: All project classes will be here.
  • jars: All external dependencies will be here.

Then on class change, we are doing to drop/re-create the main class loader only. ALL the external classes will remain the same.

This changes not only will reduce the memory usage on development but also makes application restart lot faster (of course).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions