Skip to content

disable warmup tasks #5638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

disable warmup tasks #5638

wants to merge 1 commit into from

Conversation

mbien
Copy link
Member

@mbien mbien commented Mar 9, 2023

draft/experiment

Some of the warmup tasks were written in times without concurrent classloading, no class data sharing, no tiered compilation, stop the world GCs, systems with 1-2 cores and mechanical disks.

Today, they likely do more harm than good.
I tested with disabled warmup tasks the first time usage of: menu entries, auto completion, rename refactoring, drag and drop, popups etc and could see no difference to before. Everything appeared instantly.

The tasks would have taken ~3s total on my system after startup, time the IDE can spend for other things.

the following tasks were active (X means now disabled):

Found [
X WarmUp/org-netbeans-modules-editor-EditorWarmUpTask,
WarmUp/org-netbeans-modules-java-j2seplatform-DebianJavaPlatformDetector,
X WarmUp/org-netbeans-modules-java-j2seplatform-J2SEPlatformWarmUp,
WarmUp/org-netbeans-modules-java-j2seplatform-SdkManJavaPlatformDetector,
X WarmUp/org-netbeans-modules-refactoring-impl-RefactoringWarmUpTask,
MetaInfServicesLookup.Item[org.netbeans.core.ui.warmup.DiagnosticTask],
X MetaInfServicesLookup.Item[org.netbeans.core.ui.warmup.DnDWarmUpTask],
X MetaInfServicesLookup.Item[org.netbeans.core.ui.warmup.MenuWarmUpTask],
X MetaInfServicesLookup.Item[org.netbeans.modules.java.editor.JavaEditorWarmUpTask$Provider]
] warm up task(s)

remaining tasks are not used for warmup purposes.

@mbien mbien added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) performance ci:all-tests [ci] enable all tests ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Mar 9, 2023
@lkishalmi
Copy link
Contributor

Well, I think they were written to get the tiered compilation kick in, so the UI and most important the editor performance would be good right from the start.

I do not remember why I used the WarmUp hook for JavaPlatform detection instead of the usual module/main window lifecycle.

@mbien
Copy link
Member Author

mbien commented Mar 9, 2023

@lkishalmi I looked though the repo history and some were written when java 1.4 was hot (no tiered compiler back then). Some also mention class loading and even font loading in the comments.

also I just noticed that there might be at least one more which uses the @OnShowing annotation

Some of the warmup tasks were written in times without
concurrent classloading, no class data sharing, no tiered compilation,
stop the world GCs, systems with 1-2 cores and mechanical disks.

Today, they likely do more harm than good.
I tested with disabled warmup tasks the first time usage of:
menu entries, auto completion, refactoring, drag and drop, popups etc
and could see no difference to before. Everything appeared instantly.

The tasks would have taken ~3s total on my system after startup,
time the IDE can spend for other things.
@mbien
Copy link
Member Author

mbien commented Mar 14, 2023

note to self: could reproduce a small slowdown (probably less than a second, compared to instant opening) when the very first editor tab opens. Might be a reason for keeping one of the editor warmup tasks active after investigating what needs to be still warmed up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:all-tests [ci] enable all tests ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) performance work-in-progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants