This is part 6 of the series; part 5 is here.
I've ported most of my PHP application to Rails now; it has taken about 6 days of intense effort and so far I remain very impressed by the productivity and expressive power of both Ruby and Rails.
I resolved the database issues described in my last few posts by simply embedding the address fields into the School and Student tables.
I ran into another issue yesterday evening that I haven't had much time to investigate. I start a Ruby web server directly from within the RadRails Eclipse environment, which I think spawns a process to run the Ruby WEBrick web server. If I use the web application for just a few minutes, the response times go from about 1/2 second to 2 seconds, and the memory usage climbs from about 25M to 35M. The performance continues to get worse after that. These are both signs of a pretty big memory leak; about 200K per HTTP operation.
I couldn't find reference to any obvious Ruby-related memory leak problem on the net, so I'll need to do some simple experiments to narrow down the cause:
- starting WEBrick from outside Eclipse
- trying a different HTTP server
- running a Ruby memory leak detector if I can find one
I'll blog what I find out. I want to put this issue behind me very soon.
Part 7 of this series is here.