UBL in maps slowing down build

In my current project we are using UBL as our internal format. UBL, or Universal Business Language, is an effort to define a library of standard electronic XML business documents such as purchase orders and invoices. The plusside of using UBL is you have a industry standard, and there are various components and resources to easily integrate it in your solutions. The downside,from a BizTalk perspective is, the schema’s are very large, and have lot of schema references, which again have there own references, which can go up to 8 levels deep.

We had added the schema’s we needed, 2 schemas plus referenced schemas, to our project, and used them in our maps from there. When trying to build our project, we immediatly noticed the build time went up drastically, up to 10 minutes in a VM with 2 processors and 4 GB of RAM assigned, where we previously built in about half a minute. The same was true when we would try to validate or test the schema. Naturally this was unacceptable, so I went looking for a solution. The first thing I did was move the schemas to a seperate solution, and deploy it as it’s own application in BizTalk, so we can reference the schemas from there. This helped a little, but build times were still close to 10 minutes.

After digging deeper, I noticed the UBL schemas use a lot of default values. This is bad for us for two reasons, one is we don’t want these default values in our output, we only want our own assigned values. Second reason is, due to the massive amount of defaults being set, this has a big impact on our performence. To avoid generating these default values, there is a property on the map you can set called GenerateDefaultFixedNodes. This property can not be changed through the properties, instead you have to open the .btm file in an XML editor, for example Visual Studio’s XML Text Editor. Once you have opened the .btm file, you can change the value of the maps attribute “GenerateDefaultFixedNodes” from Yes to No, and the map won’t generate these default values any longer. Now when we start the build, we are back to approximatly half a minute for the build to finish.


Leave a Reply

Your email address will not be published. Required fields are marked *