= !MapGuide RFC 73 - Batch processing of layers = This page contains an change request (RFC) for the !MapGuide Open Source project. More !MapGuide RFCs can be found on the [wiki:MapGuideRfcs RFCs] page. == Status == ||RFC Template Version||(1.0)|| ||Submission Date||(July 7, 2009)|| ||Last Modified||(Christine Bao Tue July 7 02:22:17 2009)|| ||Author||Christine Bao|| ||RFC Status||ready for review|| ||Implementation Status||(under development)|| ||Proposed Milestone||2.2|| ||Assigned PSC guide(s)||Tom Fukushima|| ||'''Voting History'''|||| ||+1|||| ||+0|||| ||-0|||| ||-1|||| ||no vote|| || == Overview == This RFC improves performance by getting batch layers in one request, instead of each layer in one request. == Motivation == Currently MgMap is created on Web Extension side, and for each layer of this map it sends a request to get the resource content. This causes a lot of requests send to server again and again. To improve performance MgMap should get the layers in a single request, and use the batch processing result to create layer models. The more layers a map has, the better performance improvement is achieved. == Proposed Solution == The possible solutions could be:[[BR]] 1. Add a new API of ResourceService to get a batch of resource contents for a collection of resource identifiers[[BR]] {{{ PUBLIC_API: /////////////////////////////////////////////////////////////////////////// /// \brief /// Gets the contents of the specified resources. /// /// \param resources /// Resource identifiers describing the resources. /// \param preProcessTags /// Pre-processing to apply to resource before returning content. An empty /// string indicate no pre-processing. See MgResourcePreProcessingType for /// a list of supported pre-processing tags. /// /// \return /// MgStringCollection object representing the corresponding resource contents. /// /// \exception MgInvalidRepositoryTypeException /// \exception MgInvalidRepositoryNameException /// \exception MgInvalidResourcePathException /// \exception MgInvalidResourceNameException /// \exception MgInvalidResourceTypeException /// virtual MgStringCollection* GetResourceContent(MgStringCollection* resources, MgStringCollection* preProcessTags) = 0; }}} [[BR]] 2. MgMap doesn't request the resource content of layers one by one, instead it forms a collection of layer resource ids, and use the new API to get a collection of layer definitions. == Implications == This is new API only. There are no effects on existing applications. However, API documentation need to be updated. == Test Plan == Test both Ajax viewer and Fusion viewer. == Funding/Resources == Supplied by Autodesk.