Repository navigation
Share the tree between reads; give the server more memory (#177) - #178
Merged
Merged
Conversation
… memory A large project ran the server out of memory (#177): the schema and provisioning requests each read and parsed the whole tree again, and a page sends several at once. They now read TreeService's copy under its lock, checking the files first so a change written a moment ago is seen. The launcher lets Java use 75% of the container's memory instead of 25%; IDM_JAVA_OPTS (in idmweb.env) still overrides it. The first log line says how much heap the server has, and the quickstart and hosted install say what to do on an OutOfMemoryError. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jcombs-pointblue
added a commit
that referenced
this pull request
Nov 3, 2026
Share the tree between reads; give the server more memory (#177)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #177: a large project ran the server out of memory (
OutOfMemoryErrorinAsCodeReader.readunderVaultService.schemaClassandappSchema).Reads share the tree
The schema and provisioning requests each read and parsed the whole tree from disk, and the schema page sends several at once.
TreeService.withModel(read): runs a read-only function on the outline's copy of the tree, under the service's lock (the DOM isn't safe for two threads). It callsWatcher.refreshNow()first, a walk of file sizes and times, so a change written a moment ago is read as before.Moved onto it:
VaultService:schema,schemaClass,appSchema;ProvisioningService:prd,form,catalog.Workspacewires both to the workspace'sTreeService. Without it (tests), they read from disk as before.Left alone: reads that change the model or work on a copy (compare, deploy, preview, simulator, Designer export). They don't run on every page view.
Memory
hosted/docker/bin/idmweb: starts Java with-XX:MaxRAMPercentage=75(Java's default is 25%);IDM_JAVA_OPTScomes after, so-Xmxthere wins. Checked in the image: a 2 GB container gives a 1.5 GB heap (was 512 MB), 8 GB gives 6 GB, andIDM_JAVA_OPTS=-Xmx1ggives 1 GB.heap up to … MB.quickstart.mdDay to day: what anOutOfMemoryErrormeans, giving Docker more memory, orIDM_JAVA_OPTS=-Xmx4ginidmweb.env, whichsetupkeeps;hosted-install.mdOperate: one line on the same.The permissions warning
The third part of #177's log,
hosted.properties is readable by other userson a Windows mount, is fixed in the core: PointBlueTechnology/DirXMLDev#116. This PR now pins DirXMLDev 0.59.0, which has it, and sets the version to 0.83.0.Tests
SharedModelTest: two reads share one model; a file written without the watcher running is seen on the next read;VaultServiceandProvisioningServiceread through it.smoke.sh,smoke-hosted.sh,smoke-container.shall pass.🤖 Generated with Claude Code