Skip to content

Several optimizations of Embedded GF startup#26033

Open
OndroMih wants to merge 4 commits into
eclipse-ee4j:mainfrom
OndroMih:ondromih-2026-05-egf-startup-optimizations
Open

Several optimizations of Embedded GF startup#26033
OndroMih wants to merge 4 commits into
eclipse-ee4j:mainfrom
OndroMih:ondromih-2026-05-egf-startup-optimizations

Conversation

@OndroMih
Copy link
Copy Markdown
Contributor

@OndroMih OndroMih commented May 15, 2026

Reduces startup time by about 300ms, from 2.2s to 2.0s, about 10%

Things done:

  • set multiple properties in a single command (not so significant but might help)
  • preload some work in background ASAP
  • load some non-essential things in background (unpacking RARs to the domain)
  • do not initialize alias store if it's not needed

Reduces startup time by about 300ms, from 2.2s to 2.0s, about 10%

Things done:
- set multiple properties in a single command (not so significant but might help)
- preload some work in background ASAP
- load some non-essential things in background (unpacking RARs to the domain)
- do not initialize alias store if it's not needed
@OndroMih OndroMih added this to the 8.0.3 milestone May 17, 2026
OndroMih added 3 commits May 20, 2026 13:44
Pass the context classloader to the asynchronous jobs.

Without this, the service loader doesn't find some classes when Embedded GlassFish is started within the same JVM as Maven (using an old Maven plugin or the new plugin with execution configured to the same JVM)
@OndroMih OndroMih force-pushed the ondromih-2026-05-egf-startup-optimizations branch from 25bb136 to b74acda Compare May 20, 2026 20:15
@OndroMih OndroMih requested a review from a team May 25, 2026 11:14
/*
Unpacks the domain directory and sets up the properties related to the environment

Asynchronously completes tasks that aren't essential during startup to move them from the main thread.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At first glance I fail to see where is this async hidden here. Isn't fully completed Future returned from here? And everything happens in the same Thread that calls setEnv? I think thenRun, unlike thenRunAsync also runs in the same Thread that given Future is being computed in.

🤔

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants