ClearTrace 2008.34

It seems like all I post anymore is ClearTrace releases.  I guess that’s not a bad thing.

The next build is available. This is the full release of the multi-user functionality.  In earlier versions all I cared about was performance.  I did everything I could to make it as fast as possible.  I had just discovered SqlBulkCopy and it was my new hammer.  And all of ClearTrace looked like a nail.  The application would use SqlBulkCopy to load a summary of each trace file as it was read into memory.  All the dimensions I created (application, login, SQL statement, etc.) were loaded after all the trace files were loaded.  Also using SqlBulkCopy of course.  It was fast!  It was also pretty horrible if two people were processing traces at the same time into the same database.  The same dimensions ended up in the database multiple times with different values or the program just errored out.  If you happened to run a query while a trace was processing you got “interesting” results as the joins would partially fail.  It also forced me to take some design shortcuts in my database.

Build 34 is very understanding that multiple people might be loading and querying the repository at the same time.  Dimensions are cached locally but the database remains the official copy of the truth.  Dimensions are stored in the database as they are read from the trace file.  You should now be able to query a trace while someone else (or the command-line version) is loading it.  The performance hit turned out to be small enough that I couldn’t measure it with the second hand on my watch. 

I also improved performance for large trace files.  An early, early version of ClearTrace stored each trace row in the database instead of storing just summary information.  When I removed that code I didn’t get everything completely removed.  There was still an object being created for each trace row but never used.  It wasn’t much of a big deal until reading traces over 1GB.  At that point the application would slow down and possibly throw memory errors.  Thanks to Jérôme for pointing this out.  Actually what he did was take my binary, disassemble it, find the code in error, patch the binary, test it and then tell me the exact line that needed fixing.  I wish all my bug reports were this good!  Keep using ClearTrace Jérôme!

Show Comments