Sketches 1000 times slower in ubuntu than windows

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
yoshimitsuspeed
Posts: 194
Joined: Fri Oct 19, 2012 4:51 pm

Sketches 1000 times slower in ubuntu than windows

Postby yoshimitsuspeed » Fri Sep 27, 2013 3:47 am

I spent about an hour today trying to draw up an exhaust flange today in FC/Ubuntu.
I wanted to do the whole flange in one sketch including the outside shape and the holes inside. I have done many flanges this way. Today I got all the holes drawn out and dimensioned. Next I started on the perimeter. By the second or third line things started getting real slow. Half way around I couldn't get anything done. I would wait 5 minutes for it to resolve the sketch or would even throw over constrained errors when none were deserved. It would take 5 to 10 min to wait for a over constrained error.
This is on
OS: Ubuntu 13.04
Platform: 64-bit
Version: 0.14.2542 (Git)
Branch: master
Hash: 4db23551598858178fadfd146bb900b0f611ffdb
Python version: 2.7.4
Qt version: 4.8.4
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.5.0
8 GB ram
3.2 GB quad core + 4 virtual cores

So I went over to my windows machine. It has the same motherboard, 16 GB ram, 3.2GB dual processor with two virtual cores.
I expected this computer to be a little quicker since it has more processing power per core and FC is only single thread but what I ended up with was a completely different experience.
It took milliseconds to resolve movements or dimension changes.
I finished the sketch in about 7 minutes with no problems at all. It just frikken flew.

I had .13 on that machine so I installed the latest unstable for windows and it was just as fast.
I even threw the part into my XPS M1710. My ubuntu desktop should devastate that computer in every possible way yet the laptop was only barely noticeably slower than the Windows desktop.


I didn't want to upload my flange so I made a similar design.
Everything was going pretty smooth making it on the Ubuntu box but as I neared completing the outer edge it started getting slow. It would take a couple seconds for it to dimension a part and I couldn't drag free parts of the sketch.
I decided to see if an over constraint would throw it over. Sure enough, I added constraint 83 and it took about 30 min for the dimension box to pop up. After I clicked OK it took about another hour for it to resolve and get to a point where I could close and save the sketch.
I took the file over to my windows box and opened the file. I deleted the constraint and it instantly disappeared. I tugged around on the sketch till I found an unconstrained part and it moved freely. I added dimension 83 again and the dimension popup poped right up. I clicked okay and it closed and resolved instantly. The box in the corner said solved in .002 sec.
Like I said if I open that sketch in windows it opens instantly. When I try to go into the sketch on ubuntu it starts processing but won't go into the sketch. I'm sure it would if I waited long enough.

Whenever ubuntu is trying to solve for something one of my cores goes to 100% and cooks the entire time.

Is this a known bug? Or just an issue with my computer? I have been noticing sketches seeming really laggy lately but it has been a while since I tried a complex one.
I would love it if some others could open this on different systems and see if it's OS related or if it's just something with my computer.
Attachments
blegh.fcstd
(6.12 KiB) Downloaded 124 times
User avatar
quick61
Posts: 3793
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Sketches 1000 times slower in ubuntu than windows

Postby quick61 » Fri Sep 27, 2013 4:23 am

Well, I just deleted that file after doing a hard reset. Yea, first it froze FreeCAD when I attempted to enter edit mode on the Part Design Workbench and after about 6 minuets with the core2 of my CPU redlined at %100, I tried to kill off FreeCAD and the entire machine froze up. Can't remember the last time that happened, and the last time it did was with something under Wine. I have noticed this behavior with sketches as of late my own self, (though never getting to the point of freezing up the OS), and have just been working around it. Breaking down large sketches into smaller operations seems to work well. I remember reading something about the solver doing multi-checks on each constraint or some such as of late and that's when I started working around it.

Mark

OS: Ubuntu 13.04
Platform: 64-bit
Version: 0.14.2580 (Git)
Branch: master
Hash: 1244807f7e57c68601c77d2e4c9cb31ba9d9de78
Python version: 2.7.4
Qt version: 4.8.4
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.5.0
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Sketches 1000 times slower in ubuntu than windows

Postby NormandC » Fri Sep 27, 2013 4:28 am

I deleted Constraint83 and recreated it, and it made FreeCAD hang for less than a minute, then I got an error message saying (translating from French) "Editing this value is forbidden because the sketch contains conflicting constraints".

I've been unable to repeat that delay.

I only had a quick look but your sketch contains at least two redundant constraints that are not mentioned by the solver: Constraint3 which is a point on object between the far right circle's center and the horizontal axis. It is unnecessary since you have a symmetric constraint with the far left circle. Deleting it produces a conflicting constraint error listing a whole bunch of possible constraints to remove.

Same case for Constraint41 which is redundant because of Constraint44.
yoshimitsuspeed wrote:I would wait 5 minutes for it to resolve the sketch or would even throw over constrained errors when none were deserved.
Are you sure? Maybe your flange sketch has redundant constraints similar to what I pointed out.

OS: Ubuntu 12.04.3 LTS
Platform: 64-bit
Version: 0.14.2542 (Git)
Branch: master
Hash: 4db23551598858178fadfd146bb900b0f611ffdb
Python version: 2.7.3
Qt version: 4.8.1
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.5.0
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Sketches 1000 times slower in ubuntu than windows

Postby NormandC » Fri Sep 27, 2013 4:37 am

OK, I just updated FreeCAD to the latest daily build (same as yours), repeated what I did previously, this time FreeCAD locked up for more than 2 minutes, then I got the conflicting constraints error.

I'm wondering if this problem is specific to Ubuntu 13.04, as you are both using it?

OS: Ubuntu 12.04.3 LTS
Platform: 64-bit
Version: 0.14.2580 (Git)
Branch: master
Hash: 1244807f7e57c68601c77d2e4c9cb31ba9d9de78
Python version: 2.7.3
Qt version: 4.8.1
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.5.0

My rig:

Intel Core i5-3570K CPU @ 3.40GHz × 4
8GB RAM
yoshimitsuspeed
Posts: 194
Joined: Fri Oct 19, 2012 4:51 pm

Re: Sketches 1000 times slower in ubuntu than windows

Postby yoshimitsuspeed » Fri Sep 27, 2013 4:46 am

Hmm interesting. Maybe we can hear from some others to see if it seems to be consistent with 13.04.
Interesting that the new version caused it to lock up longer normandc. My windows box does this instantly though. Bums me out but I guess I know where I'll be doing my design work for now.
freecad-heini
Posts: 37
Joined: Wed Jun 20, 2012 9:02 am

Re: Sketches 1000 times slower in ubuntu than windows

Postby freecad-heini » Fri Sep 27, 2013 10:38 am

Hi,

I'm using Xubuntu 13.04 64 bit and I installed Freecad V14 in my native Linux as well as in Wine hq.
If I open the file and edit the sketch in native Ubuntu it freezes or need a very long time.
If I add a additional dimension, no react from Freecad.

In the Wine hq Windows Version I was able to add dimensions, and the constraints menu shows the different conflicts.
It's really o.k. - Linux is very slow for large sketches.

So I can say it's true what yoshimitsuspeed is telling us.

Zooming in a large imported step file with the middle mouse wheel, a mold base insert for car industry, the behaviour is very slow in the Linux version.
In Windows it's really faster.

Best regards

Wilfried
User avatar
yorik
Site Admin
Posts: 11458
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Sketches 1000 times slower in ubuntu than windows

Postby yorik » Fri Sep 27, 2013 2:12 pm

Zooming a model in the 3D view depends 100% on your graphics driver. So it is totally probable that it goes much faster on a system with a better supported 3D driver.
The sketch also takes a very long time to edit for me on debian... This has certainly nothing to do with graphic driver. Weird! I cannot guess how that part can be different between windows and linux...
User avatar
quick61
Posts: 3793
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Sketches 1000 times slower in ubuntu than windows

Postby quick61 » Fri Sep 27, 2013 4:41 pm

I have made note of some more characteristics of this sketch behavior on my Kubuntu Linux machine.
  1. Making an equally or more complex sketch with straight lines (as in points that must be constrained) does NOT display the behavior. This behavior seems to occur when arcs are introduced with the polyline tool.
  2. When the constraints are not in conflict, FreeCAD behaves normally and there is hardly any delay in the solver.
  3. Application of an incorrect or redundant constraint immediately sends the program into overload (freeze up / %100 consumption of CPU core) Allowing it enough time, FreeCAD does recover.
  4. The more constrained the sketch is, the longer it takes to recover.
  5. After recovery, the solver incorrectly reports something like 0.052 seconds to solve when in reality it took 5 - 8 minuets. (this might be a clue?)
  6. To delete the offending constraint takes just as long a delay to select and remove it.
  7. After removal of offending constraint, operation returns to normal and behaves just as it always did.
Hope this might help track down what might be going on.

Mark
Last edited by quick61 on Fri Sep 27, 2013 8:58 pm, edited 1 time in total.
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
bejant
Posts: 5812
Joined: Thu Jul 11, 2013 3:06 pm

Re: Sketches 1000 times slower in ubuntu than windows

Postby bejant » Fri Sep 27, 2013 5:20 pm

normandc wrote:Maybe your flange sketch has redundant constraints similar to what I pointed out.
When I opened the sketch to edit it, my solver message only said that Constraint 40 was redundant so I deleted it, no problem. Clicked Undo, then deleted Constraint 83; no problems either. Interesting that my Solver showed different conflicts.

OS: Windows XP
Platform: 32-bit
Version: 0.14.2370 (Git)
Branch: master
Hash: a836759ebd91404954a778ff8885e152611576e1
Python version: 2.6.2
Qt version: 4.5.2
Coin version: 3.1.0
SoQt version: 1.4.1
OCC version: 6.5.1
triplus
Posts: 8605
Joined: Mon Dec 12, 2011 4:45 pm

Re: Sketches 1000 times slower in ubuntu than windows

Postby triplus » Fri Sep 27, 2013 7:42 pm

If this is true than it has to be "code related". The biggest difference are usually GPU drivers but still generally speaking nowhere near the factor 1000.

But this isn't GPU driver related and if the difference is really that big then not the same software libraries are used or it's a bug. If it can't be fixed it would still be interesting to know what exactly is the culprit and i hope one of the devs will have that answer.