Main

September 21, 2007

Tools used for DotSVN - Resharper

I have been using a trial version of ReSharper for my DotSVN project and I should say that I just got hooked to it. I would not have made this much progress without it and that leaves me wondering what I would do once the trial expires!!

A tool with this ease of use is needed to improve the design and code without any hesitation to refactor.
ReSharper's code navigation capabilities are also extra ordinary. You can read more about it here.

I have also used dotTrace to fix a nasty performance issue.

Overall I am very satisfied with the product.

September 19, 2007

Performance of DateTime.Parse()

I would like to write a series of posts describing the various performance issues I faced while implementing DotSVN.

In this post I discuss the performance penalty of using DateTime.Parse().

During my testing, I found that DotSVN was running quite slow. I used a trial version of 'JetBrains dotTrace 3.0' to analyze the problem. The following is a screen-shot of the dotTrace session.
DateTime.Parse() Performance issue

As you can see, 26% of the time is spend on the method call 'System.DateTime.Parse()'. This was unacceptable. After some investigation I found that the performance of the DateTime Parse method can be improved if we give some clue on formatting of the date string. This can be achieved using the ParseExact() method.

note: I have updated the code to re-use the CultureInfo class.
AlexKucherenko - Thanks for the comment.



The performance gain is quite obvious with the following figure, which shows the dotTrace session after applying the above fix.
DateTime.ParseExact() solution

As you can see, DateTime.Parse() is no longer a hot Spot. This also shows the power of dotTrace, and how it helped to quickly narrow down the issue.

September 12, 2007

Connecting to SVN repository using DotSVN

In this post I would like to highlight how easy it is to connect to SVN repository using DotSVN.

Steps to follow:
1) Create an instance of ISVNRepository using the SVNRepositoryFactory
2) Now that we have a connection to the repository, we can get contents using the GetDir method.
The SVNDirEntry representation of a versioned directory entry, It contains
  • The Entry name
  • Entry kind (is it a file or directory).
  • File size (in case an entry is a file)
  • The last changed revision
  • The date when the entry was last changed
  • The name of the author who last changed the entry
  • The commit log message for the last changed revision.

3) Now we can iterate through the SVNDirEntry collection.

And that is it. We can also call other methods in the repository like

The SVNKit influence on DotSVN

I used two good references when doing DotSVN. The first is (obviously) the SVN code itself. It is written in C using Apache Portable Runtime (APR).

What I would like to highlight is the second reference that I used - which is SVNKit. SVNKit is:

... a pure Java Subversion client library. You would like to use SVNKit when you need to access or modify Subversion repository from your Java application, be it a standalone program, plugin or web application. Being a pure Java program, SVNKit doesn't need any additional configuration or native binaries to work on any OS that runs Java.

I used VStudio's 'Java Language Conversion Assistant 3.0' to create a C# version of the SVNKit code. Though it had thousands of migration errors, this exercise gave me a good idea of the effort involved in completing DotSVN. I used the skeleton code from the migration as the basis for most of the my classes.

DotSVN has a different namespace structure (as shown in the figure below):
DotSVN Namespace and project structure

DotSVN depends more heavily on .Net base class libraries (like Deflate stream, custom Date parsing etc). It also uses generics and collection classes more efficiently.

September 11, 2007

DotSVN progress

I am personally quite happy with the progress that I could make on DotSVN. Using this library, it is currently possible to do the following operations.
  • Open an FSFS SVN repository
  • Enumerate its contents
  • Retrieve the properties collection of each element
  • Get the contents as a stream
I have also added three sample application. One is a console based application. The second one is a WinForms GUI sample that is very similar to the TortoiseSVN repository browser. The third one, is a browser based SVN repository viewer using Yahoo UI controls.

August 27, 2007

Significant milestone reached for DotSVN

I am happy to announce the first increment release of DotSVN.

DotSVN is a 100% compatible (at the repository level) port of SVN - very similar to SVNKit. It can be used to access or modify SVN repository from DotNet application, be it a standalone program or from an Asp.Net web application. As mentioned here, this project was started to support the nTrac project.

 Sample GUI Client for DotSVN
Sample .Net application build using DotSVN, accessing an FSFS file repository using 'file access'.

July 31, 2007

Producing Open Source Software

I came across this book by Karl Fogel on the same title. The book describes how to run a successful free software project. 90-95% of all Open Source software fails. All the more reason why this book is important.

Producing Open Source Software is a book about the human side of open source development. It describes how successful projects operate, the expectations of users and developers, and the culture of free software.

In the sprit of Open Source, this book is released under an open copyright that allows everyone to share and modify the book freely. You can get your copy here.

July 6, 2007

nTrac progress - Day 2

As discussed in my previous post, I prefer the option of embedding subversion into nTrac. I looked at available .NET implementations of SVN and the ones I could find are listed below:

Svn.Net uses PInvoke to wrap SVN libraries while AnkhSVN uses managed C++. The latter is better (though I would have preferred the newer C++/CLI syntax).

Both of them are focusing only on the client access layer of SVN. I want a library that can access SVN at the repository level.

Right now, I am planning to implement this fully in .NET. Something similar to SvnKit, which is a full-fledged implementation of SVN in Java.

July 5, 2007

Update on nTrac

I have decided to take some time off, and focus on nTrac. I am in the process of defining the scope for the same.

My thoughts on the initial version are as follows:

  • This is targeted towards Windows developers. The product should scale from a single user to a group of users very easily. 
  • Ease of deployment is very important. The basic install will have source-control (SVN) and web based tracking up-and-running.
  • The product will have very little external dependency - It should work on an XP box with .Net and nothing else.
  • The Desktop deployment' should will a customized version of the Cassini Web server and will run off the system tray (very similar to ScrewTurn Wiki desktop edition).

To enable this level of ease of deployment, I prefer the option of embedding subversion into the product. A good .Net binding for Subversion will definitely help.

I will continue to update the progress that I am making here.

May 13, 2007

DotNet IM Client based on XMPP

I have been working (along with my sister and cousin) on an XMPP based IM client. This is fully implemented in DotNet. The current version (1.0.1) can connect to Google Talk. The project is hosted here

You can get the latest code from the following SVN url:
http://chatapp.googlecode.com/svn/trunk/

Here are some screen shots of the application.

Main Window 

And the Chat Window

ChatWindow

The 'About Box' describes the different components that we are using.

AboutBox

 I would appreciate your valuable comments - please post them here.

March 8, 2007

Using SVK

I came across some articles that describe SVK as a better version control system, than say SVN.

svk is a decentralized version control system built with the robust Subversion filesystem. It supports repository mirroring, disconnected operation, history-sensitive merging, and integrates with other version control systems, as well as popular visual merge tools.

I already have an SVN server running at my home PC, and I am quite happy with the 'Tortoise SVN' client. I came across SVK, when I was researching the possibility of maintaining an SVN mirror repository - especially useful if your SVN repository is hosted on a remote server.

I will be documenting my experience with this, but if you have any comments, please do share... 

March 6, 2007

Started NTrac on Google Code

I wanted to create a DotNet port for Trac. This will facilitate easy deployment and maintenance for Windows users. I will also adopt the same 'minimalistic approach' to web-based software project management.

Here is the URL to the project.

Archives

Subscribe by e-mail

Creative Commons License
This weblog is licensed under a Creative Commons License.