Ruby on Rails and Memory Usage / Leaks
June 18, 2008
I’ve been running ClockingIT for quite a while now, and at some point something was introduced which made the memory usage grow and grow over time. I installed God to monitor and restart my Mongrels whenever they grew too big, but I can’t say I’ve been very comfortable with that solution.
Then, when I bought a new server to run on, I figured I’d get a bit more RAM and go 64bit to be able to use it. And found out that Ruby uses ~ 2x the memory, due to addresses in every object taking double the space.
I took some time to look for a better solution, and found something which works really great for me.
Enter Thin, Slim Attributes, Erubis and a Ruby GC patch:
Setup Time VIRT RES ----------------------------------------------- MRI/Mongrel 0m37.607s 181660 120720 MRI/Mongrel/Erubis 0m37.536s 181660 120920 MRI/Mongrel/Slim 0m36.399s 181672 119300 MRI/Mongrel/Erubis/Slim 0m36.020s 182696 120064 GC/Mongrel 0m37.416s 177560 119268 GC/Mongrel/Erubis 0m37.260s 172440 114484 GC/Mongrel/Slim 0m35.024s 164260 105656 GC/Mongrel/Erubis/Slim 0m35.049s 163236 104656 MRI/Thin 0m36.828s 172624 111512 MRI/Thin/Erubis 0m36.878s 175696 114724 MRI/Thin/Slim 0m35.457s 175708 113532 MRI/Thin/Erubis/Slim 0m35.087s 176732 114700 GC/Thin 0m36.208s 166476 108888 GC/Thin/Erubis 0m36.121s 166476 108724 GC/Thin/Slim 0m33.854s 155224 97060 GC/Thin/Erubis/Slim 0m33.832s 155224 97080
Keep in mind that this is on a 64bit platform, so a 32bit version would use ~ half the memory.
I’m getting a lot fewer restarts of my webservers with this setup, which can only be a good thing. It’s also been rock solid after ironing out a couple of problems with Slim Attributes.
Gantt galore!
June 17, 2008
I’ve had a bit of fun lately, adding a way to easily see your schedule and make changes. It’s not a strict gantt chart like MS Project uses, but rather an automatic one which shows remaining work as time passes and work is logged.
Whenever an estimate or due date is changed, the chart is automatically updated and re-scheduled to try and accomodate your wanted schedule.
If multiple people are assigned to the same task, it’ll be scheduled for when everyone has time free. This will probably be possible to specify with an option later on.
I’m also not sure if filtering the list makes a lot of sense, as you’d end up with either a bogus schedule (consider only the shown tasks) or strange gaps in the schedule (occupied by hidden tasks).
Hope you find it as usefull as I do.
New instant messaging
June 2, 2008
As I’m at home with my young daughter these days on paternity leave, I needed something to do while she had her naps in the mornings. I really liked the idea of a Facebook-ish messaging system, which someone suggested on the forums, and started last Tuesday.
On Saturday, it was ready for launch, and is now live.
Total implementation time, 9.5 hours including styling and fiddling with IE6.
More Flexibility
January 6, 2008
I’ve started working on making ClockingIT a lot more customizable, as it’s too rigid and geared towards software development at the moment.
Giving you control over the task types, as well as making most attributes / fields of a task customizable would give you a lot of flexibility for how you work. Adding a flexible and customizable workflow would really give you a system where you can work exactly like you want.
My local development branch (living in a git branch at the moment) is moving along nicely, and I’ve got support for custom task types, custom text fields and select boxes. I’ve still got loads to do before this is anywhere near done, but it’s coming along nicely.
The hardest part will be to integrate all of this flexibility into the browsing/filtering/views while not making the interface overly complicated and making sure I don’t forget any hardcoded properties from before this big change.
Another challenge will be to make the admin interface for all of this, and keep it simple enough to use. I’ll also have to provide project templates now, as configuring a new project take a lot longer than before if you have to start from scratch each time.
I’m also a tiny bit concerned about increased rendering time, as I need to do more database lookups per task than before, but by introducing caching again it should end up being faster than it currently is.
Git trial
January 4, 2008
I’ve been trying git locally for the past few weeks, and I must say I’ve grown quite fond of the easy branching and stellar merging. As ClockingIT doesn’t run on Windows anyways, I guess there’s not much stopping me from switching from darcs to git.
Darcs back to normal…
December 16, 2007
.. after committing my (somewhat) large changes, the whatsnew and diff commands went back to normal speeds.
Although, now that Git has git add --interactive the main reason for staying with Darcs seems to have disappeared. I’ve managed to import my Darcs repository into Git via tailor, and will try to use both Darcs and Git for a while to see which one I end up liking the best.
Darcs is getting slow
December 11, 2007
time darcs whatsnew -ls real 3m35.948s time git status real 0m0.450s
I’ve added and modified a few hundred files, but still..

