The time taken to perform these mappings is a result of the size of the Target DOM which XE stores in memory when performing translations. In a large file the Target DOM may exceed the size of actual physical memory, causing excessive paging by the operating system and hence an exponential increase in processing time.
There is a way to drastically minimise the processing time, but it requires an amendment to the way that the mapping is written. This method entails splitting the original map DLL into several separate DLLs, handling, say, the Header, repeating Body and Trailer functions. Each DLL is triggered by a specific record type encountered in the in-house file.
The index must then be amended to call these DLLs and flushing of the Target DOM occurs with each change. The following is a sample of changed "proc" handling:
<trans id="Test" docSource="Header" singleTgtDoc="true">
<proc id="Header" docSource="Header" docTarget="Output" mapDll="Header.dll" opConfig="UTF8" triggerRecord="HEADER"/>
<proc id="Body" docSource="Body" docTarget="Output" mapDll="Body.dll" opConfig="UTF8" triggerRecord="BODY"/>
<proc id="Trailer" docSource="Trailer" docTarget="Output" mapDll="Trailer.dll" opConfig="UTF8" triggerRecord="TRAILER"/>
</trans>