Ruby slowness

Hello all,

This involves rails (specifically) activerecord but it isn’t really
about rails. I am working on a script to do a data migration from an old
system to a new rails system. After about 10 minutes of creating new
data in the new rails database, doing a save suddenly starts to take
several seconds. Also, the memory usage goes up. I am running
1.9.3-p448. I tried to run 2.1.1 and saw similar results (which
surprised me).

The process starts at 160MB and goes over 300MB and at the point it
slows down, it goes from like 200MB to 300MB. The script does eventually
finish, but I need to figure out this slow down issue.

Any help would be greatly appreciated.

Steve

Without looking at your code it’s hard to give any help.

If your migration script creates objects from all the records in your
database, you must not wonder it takes so much time and memory. But as
said above, it’s hard to tell without the code.

You might want to try asking this in the Rails forum.