Changes between Version 7 and Version 8 of MapGuideRfc110
- Timestamp:
- 04/21/11 23:06:30 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MapGuideRfc110
v7 v8 24 24 == Overview == 25 25 26 This RFC adds some profiling APIs to !MapGuide to help identify resources that need to be optimized and performance bottlenecks.26 This RFC adds an !MgProfilingService which provides some profiling APIs to !MapGuide to help identify resources that need to be optimized and performance bottlenecks. 27 27 28 28 == Motivation == … … 43 43 MgColor* backgroundColor, 44 44 CREFSTRING format, 45 bool bKeepSelection, 46 INT32 runs); 45 bool bKeepSelection); 47 46 }}} 48 47 … … 51 50 MgByteReader* ProfileRenderDynamicOverlay(MgMap* map, 52 51 MgSelection* selection, 53 MgRenderingOptions* options, 54 INT32 runs); 52 MgRenderingOptions* options); 55 53 }}} 56 54 … … 60 58 INT32 height, 61 59 MgColor* backgroundColor, 62 CREFSTRING format, 63 INT32 runs); 64 }}} 65 66 {{{ 67 MgByteReader* ProfileResource(MgResourceIdentifier* resource, INT32 runs) 60 CREFSTRING format); 61 }}} 62 63 {{{ 64 MgByteReader* ProfileResource(MgResourceIdentifier* resource) 68 65 }}} 69 66 … … 85 82 !MapDefinition: 86 83 {{{ 84 Resource Id 85 Coordinate System 86 Extents 87 Layer Count 88 Watermark Count 89 Image Format 90 Render Map Time 91 Render Layers Time 92 Render Selection Time 93 Render Watermars Time 94 Render Labels Time 95 Create Image Time 96 }}} 97 98 !LayerDefinition: 99 {{{ 100 Resource Id 101 Schema Name 102 Feature Class Name 103 Scale Ranges 104 Coordinate System 105 Filter 106 Number of Features 87 107 Render Time 88 Initial scale ranges 89 Initial layers 90 Base layers 91 Coordinate System 92 Legend details 93 Data extents 94 }}} 95 96 !LayerDefinition: 97 {{{ 98 Render Time 99 Query Time 100 Number of Features 101 Feature Class 102 Properties 103 Data Extents 104 Filters 105 Scale Ranges 106 Theme Rules 107 Tooltip 108 URL 109 Watermark (If applicable) 108 Get Idendity Properties Time 109 Coordinate System Transform Time (Only applies if we are profiling a map rendering process.) 110 Query Features Time 111 Stylization Time 110 112 }}} 111 113 112 114 !FeatureSource: 113 115 {{{ 114 Initial FDO Connection Time 115 Subsequent FDO Connection Time (Cache hits) 116 Initial DescribeSchema Time 117 Subsequent DescribeSchema Time (Cache hits) 118 Remaining cached FDO information 116 Resource Id 117 Provider Time 118 IsFromCache 119 119 Joins 120 120 Calculations 121 Coordinate System of Data (Indicate if a CS transformation is needed. Only applies if we are profiling a map.) 122 }}} 121 Open Connection Time 122 Describe Schemas Time 123 SelectFeatures Time 124 }}} 125 126 !WatermarkDefinition 127 {{{ 128 Resource Id 129 Position Type 130 Stylization Time 131 }}} 132 133 Labels: 134 {{{ 135 Label Count 136 Render Labels Time 137 }}} 138 123 139 124 140 == XML Report / Schema == … … 128 144 '''TBD XML document schema''' 129 145 130 Example of profiling a !MapDefintion: (Work in progress) 131 {{{ 132 Map Summary 133 Layer(s) Summary 134 Layer(s) Details 135 Feature Source(s) Summary 136 Feature Source(s) Details 146 Example of profiling rendering map process: (Work in progress) 147 {{{ 148 -MapProfileResult 149 -Map Summary 150 Resource Id 151 Resource Id 152 Coordinate System 153 Extents 154 Layer Count 155 Watermark Count 156 Image Format 157 Render Map Time 158 Render Layers Time 159 Render Selection Time 160 Render Watermars Time 161 Render Labels Time 162 Create Image Time 163 -Map Details 164 -LayerProfileResult 165 -Layer(s) Summary 166 Resource Id 167 Schema Name 168 Feature Class Name 169 Scale Ranges 170 Coordinate System 171 Filter 172 Number of Features 173 Render Time 174 Get Idendity Properties Time 175 Coordinate System Transform Time (Only applies if we are profiling a map rendering process.) 176 Query Features Time 177 Stylization Time 178 -Layer(s) Details 179 +Feature Source(s) Summary 180 +Feature Source(s) Details 181 -SelectionProfileResult 182 Layer(s) Summary 183 Layer(s) Details 184 -WatermarkProfileResult 185 -Watermark(s) Summary 186 Resource Id 187 Position Type 188 Stylization Time 189 +Watermark(s) Details 190 -LabelsProfileResult 191 -Labels Summary 192 Label Count 193 Render Labels Time 194 137 195 }}} 138 196 139 197 == Implications == 140 198 141 None as these are new APIs. 199 Solution 1. 200 Copy the implementation of profiling related APIs to !MgServerProfilingService and add profiling code into the copied version, for example, copy the implementation of !RenderMap in !MgServerRenderingService(and all other MG server APIs invoked in !RenderMap) to !MgServerProfilingService. The advantage and disadvantage of this implementation is obvious: less influence on the origial implementation but heavy maintainence to do in the future. 201 202 Solution 2. 203 Inject the profiling code into the functions being profiled, which means !MgServerServices should be extended to accept a !ProfileResult and the implementation of some APIs will updated to support profiling. For example, to support profiling !RenderMap, all the !MgServerServices in the !RenderMap workflow will be affected - !MgServerRenderingService, !MgServerResourceService, !MgServerFeatureService, !MgServerDescribeSchema, !MgServerSelectFeatures, etc. 204 205 For both solustions, how many code should be copied or updated will be decided by how detailed information should be gathered. 142 206 143 207 == Test Plan ==