During tracing the startup time of Eclipse I noticed that shutdown is also slow.
On a workspace with 756 projects and ~3300 markers the "Saving Workspace" dialog shown by
IDEWorkbenchAdvisor.disconnectFromWorkspace() stays up for several seconds on shutdown.
Happens in SaveManager.save(FULL_SAVE, ...), and parts of it are done regardless of
what actually changed:
SafeFileOutputStream commits by copying the temporary file over the target, so the workspace
tree, .markers and .syncinfo are written twice.
visitAndSave rewrites .markers and .syncinfo for every project, even when neither changed
since the last full save. The snapshot path already tracks this per resource, the full save does not.
visitAndSave and visitAndSnap read the clock four times per visited resource even when no
save trace option is enabled.
resetSnapshots, removeUnusedTreeFiles and saveMetaInfo walk all projects sequentially doing
file system stats, while visitAndSave next to them already runs per project in parallel.
- A slow
ISaveParticipant is invisible without enabling -debug, so third party contributions
cannot be told apart from platform work.
I plan to work on these.
During tracing the startup time of Eclipse I noticed that shutdown is also slow.
On a workspace with 756 projects and ~3300 markers the "Saving Workspace" dialog shown by
IDEWorkbenchAdvisor.disconnectFromWorkspace()stays up for several seconds on shutdown.Happens in
SaveManager.save(FULL_SAVE, ...), and parts of it are done regardless ofwhat actually changed:
SafeFileOutputStreamcommits by copying the temporary file over the target, so the workspacetree,
.markersand.syncinfoare written twice.visitAndSaverewrites.markersand.syncinfofor every project, even when neither changedsince the last full save. The snapshot path already tracks this per resource, the full save does not.
visitAndSaveandvisitAndSnapread the clock four times per visited resource even when nosave trace option is enabled.
resetSnapshots,removeUnusedTreeFilesandsaveMetaInfowalk all projects sequentially doingfile system stats, while
visitAndSavenext to them already runs per project in parallel.ISaveParticipantis invisible without enabling-debug, so third party contributionscannot be told apart from platform work.
I plan to work on these.