BSA – Load Performance

It is a bit more fun to show SW as the UI on BSA starts to get operational. The diagram below is a high level draft of BSA itself and it has been saved and loaded. The tree to the left is the document showing the structure as a tree. This project consist of 3 diagrams and a total of 1888 XML lines, but it takes 9 seconds to load – this will be unacceptable as projects will grow very large. 50% of the problem is loading the tree to the left, the other 50% is the XML parser I use.

Moving forward I will avoid loading the tree and only load headlines that can be expanded by users – this is an old trick and I am aware that IO between CPU and GPU is a bottleneck. The XML load performance can be solved by using a non SAX parser – I think a more classic DOM parser will be faster in this case. But, I also have a GIT integration issue so I plan to make the file content more readable and split the project into multiple files. In that case we just load the head project and load more as the user open diagrams. Luckily this change is straight forward “as is”.

I seldom bother with performance before I have functionality in place, but this error will become functional. It is not much content in these diagrams and I can see performance dropping with size, so the tool will be useless unless I improve this.

One important issue is that I need to examine why my XML parser is slow before I make any change otherwise I might be stuck with the same problem in a new parser!

Categories: BSA

Leave a Reply