Rubymine locks up with changes to large schema.rb

I have a large Rails 2.3.9 project. Switching between git branches can lock the IDE for up to 7 1/2 minutes. I'll try to describe how this happens and provide the best information I can.

It seems to be related primarily to schema.rb file changes.

Environment:
Rails 2.3.9
Rubymine 3.1.1
Quad-core Intel i5
Ubuntu 10.10 (Maverick)
Git (SCM) integration
Data Sources defined in Rubymine
--
DB: 178 tables
schema.rb: 4360 lines (uses indexes, foreign keys, etc.)

I can email some versions of the schema.rb file (but I don't want them on here).

Scenarios:
Adding a migration
Creating a new migration:
class CreateStupidTable < ActiveRecord::Migration
  def self.up
    create_table :stupid_test do |t|
      t.string :name
      t.timestamps
    end
  end

  def self.down
    drop_table :stupid_test
  end
end

Run rake task in Rubymine to db:migrate:
* Migration done within 10 seconds.
* IDE locks with 100% on 1 core for total time of 00:04:30 before IDE responds again.

Migrating down:
* Migration done within 8 seconds
* IDE fine and works same

Merging branches with changed schema.rb
Merged branch with conflicting changes in schema.rb (formatting changes from new column). Included a new migration. Included other non-conflicting changes as well.

Ran the migrations on the database:
* Migration execution is fast ( < 10sec)
* IDE locks, 100% on java process
* I've forgetten what I was doing.
* Total time being unproductive: 0:07:38
* NOTE: I had left my debug server running (usually try to stop it first, don't know if it helps or not)

I never know when it will take a really long time or not. There is a sense of dread when switching branches within Rubymine. Sometimes it is faster and easier to close Rubymine and do the git operations from a command-line.
---
~30 seconds to perform large git branch merge.
Locked IDE 100% single core. Total time = ~5 min

Small project with partial duplication
I can email the referenced files below. Don't want included in this forum.

Steps to reproduce:
1) Create a new Rubymine project "big_schema". Used Rails, 2.3.9 (haven't tested for 3.x)
2) Create a new schema file: New file "db/schema.rb"
3) Paste in contents of "schema-older.rb" and save
4) Paste over that the contents of "schema-newer.rb"

Takes ~30 for 2nd paste to complete.

Hit CTRL+Z to undo the paste: locks for ~3min



Solutions:

  • Workaround: Be able to disable Rubymine's schema.rb parsing
  • Prevent the IDE from locking
2 comments
Comment actions Permalink

Submitted as bug in Youtrack.

0
Comment actions Permalink

Thanks for the issue.

Regards,
Oleg

0

Please sign in to leave a comment.