Skip to content

feat: add gzip pre-compression for static assets to improve load time#761

Draft
RomanNikitenko wants to merge 1 commit into
che-incubator:mainfrom
RomanNikitenko:reduce-ide-loading
Draft

feat: add gzip pre-compression for static assets to improve load time#761
RomanNikitenko wants to merge 1 commit into
che-incubator:mainfrom
RomanNikitenko:reduce-ide-loading

Conversation

@RomanNikitenko

Copy link
Copy Markdown
Collaborator

What does this PR do?

  • Pre-compresses JS/CSS/HTML/JSON files during Docker build (gzip -9)
  • Serves .gz files directly when client supports Accept-Encoding: gzip
  • Falls back to uncompressed files if .gz is missing or on any error
  • Adds CODE_DISABLE_STATIC_GZIP=1 env variable as kill switch

Expected improvement:

  • workbench.js transfer drops from ~16MB to ~4.4MB: (~3.7x reduction),
  • significantly reducing white screen time https://redhat.atlassian.net/browse/CRW-10327
  • zero risk of regression: if .gz files don't exist or env variable is set, the server behaves exactly as before

What issues does this PR fix?

https://redhat.atlassian.net/browse/CRW-10327

How to test this PR?

Does this PR contain changes that override default upstream Code-OSS behavior?

  • the PR contains changes in the code folder (you can skip it if your changes are placed in a che extension )
  • the corresponding items were added to the CHANGELOG.md file
  • rules for automatic git rebase were added to the .rebase folder

Assisted-by: Cursor AI

Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Assisted-by: Cursor AI
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Click here to review and test in web IDE: Contribute

@tolusha

tolusha commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Hi! I'm che-ai-assistant — I help with your pull requests.

Available commands:

  • /che-ai-assistant generate-che-doc — Generate a documentation PR based on this PR's changes
  • /che-ai-assistant ok-pr-review — Run a comprehensive PR review (summary, code review, deep review, impact analysis)
  • /che-ai-assistant check-pr-test-failures — Analyze failing CI checks, identify root causes, and suggest fixes
  • /che-ai-assistant update-che-e2e-tests — Update Eclipse Che e2e tests
  • /che-ai-assistant help — Show this help message

@github-actions

Copy link
Copy Markdown
Contributor

@rgrunber

Copy link
Copy Markdown
Collaborator

I'm not seeing a huge improvement in speed, but there's definitely less data being transferred. It might make a difference on slower connections.

Before

workbench.js dom load finish (s) total transfer
1.24s 334ms 4.39s 19.64s 19.82MB
770ms 436ms 3.94s 16.65s 19.82MB
508ms 447ms 3.85s 16.32s 19.82MB
1.05s 502ms 4.22s 17.09s 19.82MB
3.27s 437ms 6.36s 19.15s 19.82MB

After

workbench.js dom load finish (s) total transfer
894ms 447ms 4.24s 18.03s 6.40MB
793ms 287ms 4.03s 18.09s 6.40MB
635ms 437ms 3.89s 17.78s 6.36MB
567ms 362ms 3.78s 18.50s 6.36MB
472ms 232ms 3.64s 17.25s 6.36MB

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.

3 participants