Bug #49266 WB memory consumption runs wild, hangs while scrolling non-trivial ERD
Submitted: 1 Dec 2009 15:57 Modified: 26 Jun 2010 21:29
Reporter: Todd Farmer (OCA) Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S1 (Critical)
Version:5.2 r4643 OS:Windows (XP)
Assigned to: Mike Lischke CPU Architecture:Any

[1 Dec 2009 15:57] Todd Farmer
Description:
I created an ERD from an existing database of 217 tables (no views, procedures, triggers, etc.).  As I scroll the ERD, RAM utilization runs wild and Windows becomes completely unresponsive.  It takes 2-3m to even bring up Task Manager.

How to repeat:
1.  Use attached SQL script to create a database.
2.  Create ERD from existing database
3.  Scroll through ERD.

Suggested fix:
Don't make Windows hang.
[1 Dec 2009 16:01] Todd Farmer
Non-trivial schema from mifos project.

Attachment: mifos.sql (application/octet-stream, text), 242.00 KiB.

[3 Dec 2009 15:35] Mike Lischke
This is actually a performance bug. If you wait long enough, WB will come back and be responsive. On one-CPU systems also the system will be responsive again once the importer has ended with layouting the lines. On boxes with more than one CPU this is a no-brainer.

The problem is a very inefficient layouting algorithm and this model contains some very unusual (albeit very interesting) constellations. The table currency has around 40 FKs pointing to it, up to 15 from one single table. The layouter is simply not made for that and it will take a large effort to reimplement this (actually we are planning this for ages, but never had the time).

There is an easy workaround if you don't need to manage all objects on one diagram: import the db without placing everything on a diagram. I see no crash nor increased memory consumption (WB stays all the time around 160 MB here while it "works").

Because of that I lowered priority to P3.
[13 Apr 2010 12:41] Mike Lischke
Bug #51133 is a duplicate of this one.
[30 Apr 2010 5:54] Yen-Wei Liu
I have a similar problem like this one. With several dozen foreign keys pointing to the same table, moving the table is very very very painful to wait for the responsiveness.

Now is there any other workaround as now all of my tables are in the diagrams because I still need to access all of them ?

ywliu
[12 May 2010 13:08] Alfredo Kojima
Related to Bug #52840
[17 May 2010 14:51] Mike Lischke
Fixed in repository.
[26 May 2010 21:29] Johannes Taxacher
optimization confirmed in repository. please check with upcoming version, once released, if the changes did improve the situation significantly.
[3 Jun 2010 2:34] Yen-Wei Liu
I just tried 5.2.22RC2 and it works now. Now MySQL Workbench is really useful to me.
[17 Jun 2010 5:48] Yen-Wei Liu
But there is still something weird: I started  moving tables around , then the memory usage started to grow from 100MB to around 150MB in no time, and eventually over 300MB+ !! CPU usage went over 50% too and the moving response started to get slow too.

I guess there is memory leak with this fix.
[26 Jun 2010 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".