Skip to content

chore: update Java VM arguments for improved performance on MacOS#1810

Merged
markscott-ms merged 1 commit intofinos:mainfrom
rocketstack-matt:vscode-mac-fix
Nov 18, 2025
Merged

chore: update Java VM arguments for improved performance on MacOS#1810
markscott-ms merged 1 commit intofinos:mainfrom
rocketstack-matt:vscode-mac-fix

Conversation

@rocketstack-matt
Copy link
Member

Description

VSCode on MacOS frequently complains about being out of memory.

The current configuration has -Dsun.zip.disableMemoryMapping=true, which is a known problematic setting on macOS. This flag is often recommended but can actually cause OutOfMemory errors on Mac, particularly with Apple Silicon Macs, because it forces the JVM to load entire JAR files into heap memory instead of memory-mapping them.

The key issues with current configuration:

  1. -Dsun.zip.disableMemoryMapping=true is counterproductive on Mac - it increases memory pressure
  2. Using ParallelGC may not be optimal for the language server workload
  3. The high initial heap size (4G) can cause issues on systems with memory constraints

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Code style/formatting changes
  • ♻️ Refactoring (no functional changes)
  • ⚡ Performance improvements
  • ✅ Test additions or updates
  • 🔧 Chore (maintenance, dependencies, CI, etc.)

Affected Components

  • CLI (cli/)
  • Shared (shared/)
  • CALM Widgets (calm-widgets/)
  • CALM Hub (calm-hub/)
  • CALM Hub UI (calm-hub-ui/)
  • Documentation (docs/)
  • VS Code Extension (calm-plugins/vscode/)
  • Dependencies
  • CI/CD

Commit Message Format ✅

Testing

  • I have tested my changes locally
  • I have added/updated unit tests
  • All existing tests pass

Checklist

  • My commits follow the conventional commit format
  • I have updated documentation if necessary
  • I have added tests for my changes (if applicable)
  • My changes follow the project's coding standards

@rocketstack-matt rocketstack-matt requested a review from a team as a code owner November 18, 2025 09:26
Copilot AI review requested due to automatic review settings November 18, 2025 09:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the Java VM arguments for the Java Language Server in VSCode to address memory issues on macOS, particularly with Apple Silicon. The changes remove problematic settings and switch to more appropriate garbage collection and memory configurations for language server workloads.

Key changes:

  • Removed -Dsun.zip.disableMemoryMapping=true flag that causes OOM errors on macOS
  • Switched from ParallelGC to G1GC with string deduplication for better memory management
  • Adjusted heap sizes (max: 4G→2G, min: 100m→256m) to reduce memory pressure while maintaining adequate initial allocation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@markscott-ms markscott-ms merged commit 1903723 into finos:main Nov 18, 2025
18 checks passed
@rocketstack-matt rocketstack-matt deleted the vscode-mac-fix branch November 18, 2025 09:41
pmerrison pushed a commit to pmerrison/architecture-as-code that referenced this pull request Nov 20, 2025
chore: update Java VM arguments for improved performance on MacOS
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