Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

XML - Good and Bad

By Vasant Raj,

Introduction

XML!!! It has brought advantages for the applications which we are creating. Using it, it is possible to create flexible and expandable applications. Because of the small size of files, the data transfer speed has also increased considerably, especially for web applications.

This text will not discuss about what XML is and how it is used. For that, you can go through XML simplified.

The process...

Few months back, as my team started using XML in one of our application, we were surprised by the ease with which the tasks were completed. XML was used mainly for database interactions as we need to do multiple updates, which were around thousands in number (by using the OPENXML feature of SQL Server 2000).

Now, going forward XML became the backbone of our applications and was used extensively.

Over-use!!!

Now comes the OVERUSE part which really made us work twice as the performance degraded because of XML. One of the features of our application was to build the windows explorer like structure for some set of directories i.e., displaying all the directories and files under a particular directory. All the required details were available in the database.

First, we retrieved the list of all the directories and the files for each directory. As, a tree-like structure was to be created, parent and child relation was required (this was stored in the database). With the complete result set, an XML file was created which stored the directory and its files details and also following the parent-child relation. By looking at the XML file, you can figure out the actual directory structure.

Now, the tree was to be displayed. So it was decided to use flex-grid and the XML file. It worked very nicely and fast, but the performance started degrading as the number of directories increased.

By really debugging hard, the bottleneck for this degradation was found, and to our surprise, it was the intermediate step of XML file creation. The recursion process for creating the parent-child relation in the XML file was repeated again for creating the actual tree-like structure in the flex-grid.

Conclusion

The result of this was weeks of re-work and a lesson learnt. Not every good thing can give you performance, unless all the pros and cons are taken care of before the actual implementation.
Total article views: 9746 | Views in the last 30 days: 4
 
Related Articles
FORUM

SSIS Recreate Directory Structure

Rebuilding Project Directory Structure

FORUM

Creating SQL Server 2000 Virtual Directories

Creating IIS SQL Server 2000 Virtual Directories

FORUM

Shared Directory

Shared Directory

FORUM

Database Create from Application (VB & C#)

Creating Database from an Front End Application

FORUM
Tags
miscellaneous    
xml    
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones