Skip to content
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

[jetbrains] improve startup performance #8158

Merged
merged 3 commits into from
Feb 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions components/ide/jetbrains/image/leeway.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ RUN apk add --no-cache --upgrade curl gzip tar unzip
RUN curl -sSLo backend.tar.gz "$JETBRAINS_BACKEND_URL" && tar -xf backend.tar.gz --strip-components=1 && rm backend.tar.gz
COPY --chown=33333:33333 components-ide-jetbrains-backend-plugin--plugin/build/distributions/gitpod-remote-0.0.1.zip /workdir
RUN unzip gitpod-remote-0.0.1.zip -d plugins/ && rm gitpod-remote-0.0.1.zip
# enable shared indexes by default
RUN printf '\nshared.indexes.download.auto.consent=true' >> "/workdir/bin/idea.properties"

FROM scratch
ARG SUPERVISOR_IDE_CONFIG
Expand Down
14 changes: 13 additions & 1 deletion components/ide/jetbrains/image/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,23 @@ until curl -sS "$SUPERVISOR_ADDR"/_supervisor/v1/status/content/wait/true | grep
done
echo "Desktop IDE: Content available."

# instead put them into /ide-desktop/backend/bin/idea64.vmoptions
# otherwise JB will complain to a user on each startup
# by default remote dev already set -Xmx2048m, see /ide-desktop/backend/plugins/remote-dev-server/bin/launcher.sh
unset JAVA_TOOL_OPTIONS

# enable remote debuggign if debug mode is enabled
if [ "${SUPERVISOR_DEBUG_ENABLE+}" = "true" ]; then
JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0"
export JAVA_TOOL_OPTIONS "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:0"
fi

# Set default config and system directories under /workspace to preserve between restarts
export IJ_HOST_CONFIG_BASE_DIR=/workspace/.config/JetBrains
export IJ_HOST_SYSTEM_BASE_DIR=/workspace/.cache/JetBrains

# Enable host status endpoint
export CWM_HOST_STATUS_OVER_HTTP_TOKEN=gitpod

/ide-desktop/backend/bin/remote-dev-server.sh run "$GITPOD_REPO_ROOT"

echo "Desktop IDE startup script exited"