For my personal project where I learn a language by writing five small example applications, I had ended up writing my own build tool. It was nothing much: specify the source extension, compiled file extension, and the command to execute. But then each language added some tweak that caused issues. Haskell, for instance, was the first language I wrote my example apps in that had several intermediate files that needed to be cleaned up. So then I needed to add support for specifying file extensions that could be safely deleted. And all of this was being kept in a config file that required using ConfigParser (not the nicest module in Python's stdlib to work with). I was writing too much code for a problem others have solved in separate tools for a long time.
But I hate Makefiles and that is the one build tool that I have any experience with. I have talked about replacing Python's build system with an alternative, so I figured I might as well learn a new one so as to compare against GNU Make. I considered using Bakefile, CMake, and SCons.
Bakefile was killed as a possible solution immediately based on lack of development. The mailing list has only a single new thread in October and the last release was back in February. Now being a open-source software developer I can understand having several months between releases, but I just tend to trust projects that have been updated within the last six months or at least have an active mailing list to back it up, especially when the project lacks a 1.0 release. So Bakefile was out.
CMake was a definite contender. Since it is the unofficial leader in the race in my head for a build system replacement for Python I really wanted to give CMake a try. Unfortunately I couldn't easily figure out how to create a custom build command. Since my use case is compiling several non-standard languages I needed an easy way to specify a custom build command along with a way to state what files to delete on cleanup. I just couldn't figure out how to do that in CMake.
And that left SCons. I was able to get it work with all the languages without much issue. I do have some boilerplate in several SConstruct files for tacking on file extensions of files to remove during cleanup, but it isn't bad. Plus having the build files be Python made it easy to extend it to do whatever I needed. My only complaint is that I had to hard-code the paths to the compilers since Builder commands don't seem to execute within a shell. I might just write a 'which' replacement and stick in my root SConstruct file (along with any other boilerplate I have written) and just expose the code through SCons variables. But overall I am happy with SCons for my personal use.
A place for me to babble on about Python development, Python itself, and coding in general. The title is inspired by some knights who enjoy a good shrubbery.
Showing posts with label software development. Show all posts
Showing posts with label software development. Show all posts
2007-10-28
2007-01-05
bzr/hg performance comparison with newest versions
Actually, the numbers come from bzr .13 and a checkout of hg that I updated after 0.9.3 came out. The performance numbers straight from my comparison script are below. Do realize I did not update the software on my server. I am only doing this because someone asked.
+ Create/initialize the main repository
- time
* bzr : 1.38 sec.
* bzr_shared_repo: 1.23 sec.
* hg : 0.60 sec.
- disk usage
* bzr : 0 KB
* bzr_shared_repo: 0 KB
* hg : 0 KB
+ Add the test files
- time
* bzr : 2.17 sec.
* bzr_shared_repo: 1.85 sec.
* hg : 1.07 sec.
- disk usage
* bzr : 397 KB
* bzr_shared_repo: 397 KB
* hg : 391 KB
+ Commit the adding of the test file
- time
* bzr : 6.86 sec.
* bzr_shared_repo: 7.78 sec.
* hg : 1.82 sec.
- disk usage
* bzr : 728 KB
* bzr_shared_repo: 434 KB
* hg : 587 KB
+ Commit an added line to the test files
- time
* bzr : 9.15 sec.
* bzr_shared_repo: 11.00 sec.
* hg : 1.85 sec.
- disk usage
* bzr : 753 KB
* bzr_shared_repo: 433 KB
* hg : 599 KB
+ Initialize repository on the server
- time
* bzr : 11.72 sec.
* bzr_shared_repo: 10.12 sec.
* hg : 2.89 sec.
- disk usage
* bzr : 753 KB
* bzr_shared_repo: 433 KB
* hg : 599 KB
+ Push local repository to server
- time
* bzr : 34.26 sec.
* bzr_shared_repo: 35.78 sec.
* hg : 2.74 sec.
- disk usage
* bzr : 753 KB
* bzr_shared_repo: 433 KB
* hg : 599 KB
+ Pull from server to create a pristine branch
- time
* bzr : 28.72 sec.
* bzr_shared_repo: 8.47 sec.
* hg : 3.72 sec.
- disk usage
* bzr : 1498 KB
* bzr_shared_repo: 1179 KB
* hg : 1195 KB
+ Clone local repository
- time
* bzr : 9.32 sec.
* bzr_shared_repo: 5.39 sec.
* hg : 1.97 sec.
- disk usage
* bzr : 2244 KB
* bzr_shared_repo: 1605 KB
* hg : 1790 KB
+ Commit change in cloned branch
- time
* bzr : 12.38 sec.
* bzr_shared_repo: 13.09 sec.
* hg : 2.57 sec.
- disk usage
* bzr : 784 KB
* bzr_shared_repo: 438 KB
* hg : 615 KB
+ Push changes to server
- time
* bzr : 27.53 sec.
* bzr_shared_repo: 26.01 sec.
* hg : 2.88 sec.
- disk usage
* bzr : 784 KB
* bzr_shared_repo: 438 KB
* hg : 615 KB
+ Pull from server to update pristine branch
- time
* bzr : 22.18 sec.
* bzr_shared_repo: 8.99 sec.
* hg : 5.09 sec.
- disk usage
* bzr : 787 KB
* bzr_shared_repo: 439 KB
* hg : 615 KB
+ Create/initialize the main repository
- time
* bzr : 1.38 sec.
* bzr_shared_repo: 1.23 sec.
* hg : 0.60 sec.
- disk usage
* bzr : 0 KB
* bzr_shared_repo: 0 KB
* hg : 0 KB
+ Add the test files
- time
* bzr : 2.17 sec.
* bzr_shared_repo: 1.85 sec.
* hg : 1.07 sec.
- disk usage
* bzr : 397 KB
* bzr_shared_repo: 397 KB
* hg : 391 KB
+ Commit the adding of the test file
- time
* bzr : 6.86 sec.
* bzr_shared_repo: 7.78 sec.
* hg : 1.82 sec.
- disk usage
* bzr : 728 KB
* bzr_shared_repo: 434 KB
* hg : 587 KB
+ Commit an added line to the test files
- time
* bzr : 9.15 sec.
* bzr_shared_repo: 11.00 sec.
* hg : 1.85 sec.
- disk usage
* bzr : 753 KB
* bzr_shared_repo: 433 KB
* hg : 599 KB
+ Initialize repository on the server
- time
* bzr : 11.72 sec.
* bzr_shared_repo: 10.12 sec.
* hg : 2.89 sec.
- disk usage
* bzr : 753 KB
* bzr_shared_repo: 433 KB
* hg : 599 KB
+ Push local repository to server
- time
* bzr : 34.26 sec.
* bzr_shared_repo: 35.78 sec.
* hg : 2.74 sec.
- disk usage
* bzr : 753 KB
* bzr_shared_repo: 433 KB
* hg : 599 KB
+ Pull from server to create a pristine branch
- time
* bzr : 28.72 sec.
* bzr_shared_repo: 8.47 sec.
* hg : 3.72 sec.
- disk usage
* bzr : 1498 KB
* bzr_shared_repo: 1179 KB
* hg : 1195 KB
+ Clone local repository
- time
* bzr : 9.32 sec.
* bzr_shared_repo: 5.39 sec.
* hg : 1.97 sec.
- disk usage
* bzr : 2244 KB
* bzr_shared_repo: 1605 KB
* hg : 1790 KB
+ Commit change in cloned branch
- time
* bzr : 12.38 sec.
* bzr_shared_repo: 13.09 sec.
* hg : 2.57 sec.
- disk usage
* bzr : 784 KB
* bzr_shared_repo: 438 KB
* hg : 615 KB
+ Push changes to server
- time
* bzr : 27.53 sec.
* bzr_shared_repo: 26.01 sec.
* hg : 2.88 sec.
- disk usage
* bzr : 784 KB
* bzr_shared_repo: 438 KB
* hg : 615 KB
+ Pull from server to update pristine branch
- time
* bzr : 22.18 sec.
* bzr_shared_repo: 8.99 sec.
* hg : 5.09 sec.
- disk usage
* bzr : 787 KB
* bzr_shared_repo: 439 KB
* hg : 615 KB
Subscribe to:
Posts (Atom)