Community
Participate
Working Groups
20021210 on startup, 40% of time is spent in SaveManager.startup() maybe that could be improved
Created attachment 2765 [details] startup
Related to bug 28135 which requests more instrumentation around resources plug-in startup.
*** Bug 10994 has been marked as a duplicate of this bug. ***
The resources plug-in has now been instrumented with debug information on startup/shutdown time. Debbie, please analyze and report potential problem areas and solutions here. Thanks.
Created attachment 3111 [details] startup with leading whitespace trimmed (more readable)
I believe that one area which could be improved is marker/syncinfo saving/restoring. This could be improved both in the file format and in mechanism that we use for getting the information to store. We should look at leveraging the new fast visitor mechanism as well as the internal element tree visitor.
The following timings were recorded when restoring the 'big' workspace (http://eclipse.org/eclipse/development/performance/big-workspace.html). All time numbers are milliseconds. Clearly, this would indicate that restoring metaInfo is the most expensive restore operation. full restore 6625 master table 16 - 2.41% tree for workspace 1218 - 18.38% markers for workspace 1250 - 18.87% syncInfo for workspace 969 - 14.63% metaInfo for workspace 3156 - 47.64% unaccounted 16 - 2.41% full restore 4625 master table 15 - 0.32% tree for workspace 703 - 15.20% markers for workspace 485 - 10.49% syncInfo for workspace 500 - 10.81% metaInfo for workspace 2922 - 63.18% unaccounted 0 - 0% full restore 5547 master table 0 - 0% tree for workspace 765 - 13.79% markers for workspace 485 - 8.74% syncInfo for workspace 515 - 9.28% metaInfo for workspace 3766 - 67.89% unaccounted 16 - 0.29% full restore 4531 master table 0 - 0% tree for workspace 687 - 15.16% markers for workspace 454 - 10.02% syncInfo for workspace 500 - 11.04% metaInfo for workspace 2874 - 63.43% unaccounted 0 - 0%
Average Times for Restore Information (above): AVERAGE: full restore 5332.00 master table 7.75 - 0.15% tree for workspace 843.25 - 15.81% markers for workspace 668.50 - 12.54% syncInfo for workspace 621.00 - 11.65% metaInfo for workspace 3179.50 - 59.63% unaccounted 8.00 - 0.15% Similar data collected for Save (on workspace shutdown): AVERAGES: full save 3418.25 master table 31.75 - 0.93% tree for workspace 605.25 - 17.71% markers for workspace 86.00 - 2.52% syncInfo for workspace 74.50 - 2.18% metaInfo for workspace 132.50 - 3.88% unaccounted 2488.25 - 72.79% Data used to compute the above average (for save): full save 3688 master table 79 - 2.14% tree for workspace 1218 - 33.03% markers for workspace 110 - 2.98% syncInfo for workspace 94 - 2.55% metaInfo for workspace 124 - 3.36% unaccounted 2063 - 55.94% full save 3453 master table 32 - 0.93% tree for workspace 375 - 10.86% markers for workspace 94 - 2.72% syncInfo for workspace 77 - 2.23% metaInfo for workspace 171 - 4.95% unaccounted 2704 - 78.31% full save 3235 master table 0 - 0% tree for workspace 344 - 10.63% markers for workspace 79 - 2.44% syncInfo for workspace 111 - 3.43% metaInfo for workspace 110 - 3.40% unaccounted 2591 - 80.09% full save 3297 master table 16 - 0.49% tree for workspace 484 - 14.68% markers for workspace 61 - 1.85% syncInfo for workspace 16 - 0.49% metaInfo for workspace 125 - 3.79% unaccounted 2595 - 78.71%
Recommendations: 1 - (startup/resolve) Bug 3012 suggests converting ModelObjectReader from a DOM based XML parser to a SAX based parser. 2 - (shutdown/save) Use new IResourceVisitorProxy instead of IResourceVisitor 3 - (shutdown/save) SafeFileOutputStream.copy(...) should use File.renameTo (...) before calling transferStreams. transferStreams should only be called if the rename fails. 4 - (shutdown/save) SafeFileOutputStream.copy should use buffered streams if calling transferStreams (see note 3 above). NOTE: Majority of time on saves in the 'unaccounted' category is spent closing files (hence recommendations #3 and #4 above).
Old Summary: [startup] SaveManager takes 40% of startup time Released changes to SafeFileOutputStream to HEAD. Have refactored SaveManager w.r.t. persistence of markers and syncinfo now visiting the element tree directly. Requires more testing before release.
Released changes for persisting markers and sync info to HEAD.
Closing this bug report. Bug 3012 covers the remaining issue of converting the ModelObjectReader from DOM to SAX parsing.