The Smart Go File, also sometimes called Smart Game File is basically a simple standard way to store game-recordings. Including facilities for setting up positions, diagrams, markers and record branches in the game. A file can even contain more than one game.
Although it has some short-comings and it is hard to read by humans, the format has become the de-facto standard for storing Go games electronically. A big advantage is that it's extremely easy to write a parser that reads the file written in the format and extract the games from them.
The package 'tesuji.games.go.sgf' contains a few simple data-structures to help reading SGF files. It also has a basic parser (which will become more extensive over time) and a class called SGFUtil that contains a few handy routines that help reading the data from a file or a string. And it has some conversion methods to translate an SGF file into a move-tree and vice-versa.
In the external directory directly under the project directory there now resides a file called GameCollection.sgf. This is a public domain collection of more than 40,000 games with roughly 8.5 million moves in them. In SGFUnitTest there's a unit-test that parses all these games and makes a move-tree out of each one. When I ran this test (and again ironed out some bugs) it seems to take about two minutes to read all those games. Even some basic optimizing doesn't really help, so it's time for some profiling. The thing that immediately stands out is that the DefaultMutableTreeNode.add() method takes 30% of all computation time. So I'm afraid I'll be busy for a little while writing my own TreeNode implementation.