Changes between Version 7 and Version 8 of MapGuideRfc110


Ignore:
Timestamp:
Apr 21, 2011, 11:06:30 PM (13 years ago)
Author:
liuar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc110

    v7 v8  
    2424== Overview ==
    2525
    26 This RFC adds some profiling APIs to !MapGuide to help identify resources that need to be optimized and performance bottlenecks.
     26This RFC adds an !MgProfilingService which provides some profiling APIs to !MapGuide to help identify resources that need to be optimized and performance bottlenecks.
    2727
    2828== Motivation ==
     
    4343                               MgColor* backgroundColor,
    4444                               CREFSTRING format,
    45                                bool bKeepSelection,
    46                                INT32 runs);
     45                               bool bKeepSelection);
    4746}}}
    4847
     
    5150MgByteReader* ProfileRenderDynamicOverlay(MgMap* map,
    5251                                          MgSelection* selection,
    53                                           MgRenderingOptions* options,
    54                                           INT32 runs);
     52                                          MgRenderingOptions* options);
    5553}}}
    5654
     
    6058                                     INT32 height,
    6159                                     MgColor* backgroundColor,
    62                                      CREFSTRING format,
    63                                      INT32 runs);
    64 }}}
    65 
    66 {{{
    67 MgByteReader* ProfileResource(MgResourceIdentifier* resource, INT32 runs)
     60                                     CREFSTRING format);
     61}}}
     62
     63{{{
     64MgByteReader* ProfileResource(MgResourceIdentifier* resource)
    6865}}}
    6966
     
    8582!MapDefinition:
    8683{{{
     84Resource Id
     85Coordinate System
     86Extents
     87Layer Count
     88Watermark Count
     89Image Format
     90Render Map Time
     91Render Layers Time
     92Render Selection Time
     93Render Watermars Time
     94Render Labels Time
     95Create Image Time
     96}}}
     97
     98!LayerDefinition:
     99{{{
     100Resource Id
     101Schema Name
     102Feature Class Name
     103Scale Ranges
     104Coordinate System
     105Filter
     106Number of Features
    87107Render 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)
     108Get Idendity Properties Time
     109Coordinate System Transform Time (Only applies if we are profiling a map rendering process.)
     110Query Features Time
     111Stylization Time
    110112}}}
    111113
    112114!FeatureSource:
    113115{{{
    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
     116Resource Id
     117Provider Time
     118IsFromCache
    119119Joins
    120120Calculations
    121 Coordinate System of Data (Indicate if a CS transformation is needed. Only applies if we are profiling a map.)
    122 }}}
     121Open Connection Time
     122Describe Schemas Time
     123SelectFeatures Time
     124}}}
     125
     126!WatermarkDefinition
     127{{{
     128Resource Id
     129Position Type
     130Stylization Time
     131}}}
     132
     133Labels:
     134{{{
     135Label Count
     136Render Labels Time
     137}}}
     138
    123139
    124140== XML Report / Schema ==
     
    128144'''TBD XML document schema'''
    129145
    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
     146Example 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
    137195}}}
    138196
    139197== Implications ==
    140198
    141 None as these are new APIs.
     199Solution 1.
     200Copy 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
     202Solution 2.
     203Inject 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
     205For both solustions, how many code should be copied or updated will be decided by how detailed information should be gathered.
    142206
    143207== Test Plan ==