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).
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:
Then on class change, we are doing to drop/re-create the
mainclass 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).