Recompute routine in Sketcher

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Recompute routine in Sketcher

Post by NormandC »

wmayer wrote:Whenever I move one of the arcs the recompute takes 1-2s to finish.
OS: Windows 7
Word size: 64-bit
Version: 0.15.3765 (Git)
Branch: 0001563
Hash: a73ed3144aa078ac8626480bca091bcfecd5cc38
Python version: 2.7.6
Qt version: 4.8.5
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.6.0
Eigen is 3.0.5
And it is the same version of Eigen that FreeCAD is compiled with on Ubuntu 12.04 LTS (for both stable and daily PPA).

http://packages.ubuntu.com/search?keywo ... ection=all
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Recompute routine in Sketcher

Post by jmaustpc »

normandc wrote:I am very tempted to upload on the stable and daily PPA the Eigen3 package for the 12.04 official repo and force compilation of Ubuntu 14.04 FreeCAD packages with this older version...

Edit: or maybe I should first try to upload the utopic package which is the latest stable version of Eigen (3.2.1) which includes bug fixes over the 3.2.0 version in trusty.
I wonder if the issue might be how it was compiled rather than the actual version?

from the Eigen web site
http://eigen.tuxfamily.org/index.php?ti ... timization
There are many aspects to this question, but here are some points to get you started:

1) Make sure you compile with optimization enabled. This can easily gain you a factor of ten or more.
2) Enable vectorization, as described in How can I enable vectorization?.

etc...
For me it is slow, if I drag one line in Sketch001, it locks up one cpu for a while...I guess a minute or two, I did not time it. This is with FreeCAD from git master compiled on my system.

OS: Kubuntu 14.04.1 LTS
Word size: 64-bit
Version: 0.15.3783 (Git)
Branch: master
Hash: 4dee80f4e121541801fd4d8552e66ba26dc2c9b5
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.7.1


Jim
Konstantin
Posts: 261
Joined: Wed Jul 23, 2014 10:10 am

Re: Recompute routine in Sketcher

Post by Konstantin »

normandc, you want me to recompile it with older eigen library or you will recompile FreeCAD in daily ppa?
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Recompute routine in Sketcher

Post by wmayer »

I wonder if the issue might be how it was compiled rather than the actual version?
Impossible! Eigen3 is a 100% template library and thus doesn't need to be compiled beforehand. The compiler creates the actual code on the fly when using this library in an application like FreeCAD.
And since the same source code of FreeCAD with the same compiler options but using an older Eigen3 version works fine the reason again must be found in a change in the source code of Eigen3 which causes this regression.
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Recompute routine in Sketcher

Post by NormandC »

Konstantin, this affects me as well and I want to see this resolved since I plan on erasing my Ubuntu 12.04 partition and only keep 14.04. I also want to fix both PPA repos. But it may take me a few days to do this (I'm on vacation and while I'm not going away, I am attempting to stay away from my PC and getting as much sunshine as I can :D ). In the meanwhile, if you cannot wait, sure you can compile FreeCAD yourself using an older version of libeigen3-dev. I can explain how.
Konstantin
Posts: 261
Joined: Wed Jul 23, 2014 10:10 am

Re: Recompute routine in Sketcher

Post by Konstantin »

Oh, one more idea.
Could you compile stable freecad ppa into /usr and daily ppa in /usr/local? It would be cool to have them side by side.
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Recompute routine in Sketcher

Post by NormandC »

Konstantin wrote:Could you compile stable freecad ppa into /usr and daily ppa in /usr/local? It would be cool to have them side by side.
I'm afraid I cannot do this. The source code would need to be changed, and as a packager I cannot do this (I wouldn't know how too). IIRC wmayer said in the past it would be a hassle, since on Linux files go into a lot of places...

It was raining this afternoon so I downloaded the Eigen 3.2.1 source from the utopic (14.10) repo and attempted to create a debian package with it. I have never had a compile completely lock up my PC before! After about 15 minutes it even closed the session on its own. After logging in again, the build log was stopped at 37%.

Next I simply downloaded and installed the libeigen3-dev package (3.2.1) from utopic. It seems to be compatible. I compiled FreeCAD again, and... no change. Editing Sketch001 locks up the sketch for 25 seconds on my PC.

Next I will install the older Eigen library from Ubuntu 12.04 LTS, and compile FreeCAD again.
Konstantin
Posts: 261
Joined: Wed Jul 23, 2014 10:10 am

Re: Recompute routine in Sketcher

Post by Konstantin »

Ok then. Waiting for updated Freecad. Tried to compile it on my own, but children... what can I do :)
But will you discuss this situation with Eigen developers later? Or just freeze eigen version?
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Recompute routine in Sketcher

Post by NormandC »

I have bad news: Eigen does not seem to be the culprit in our Sketcher hang up problems.

I just finished compiling FreeCAD from scratch using the older 3.0.5 libeigen3-dev package installed. There is absolutely no change:
wmayer wrote:Whenever I move one of the arcs the recompute takes 1-2s to finish.
It takes 25 seconds here before FreeCAD becomes responsive again, and that is with Eigen 3.0.5.

OS: Ubuntu 14.04.1 LTS
Word size: 64-bit
Version: 0.15.3785 (Git)
Branch: master
Hash: d5469ba3fcc7a38b9dbb11e2db7e3c7bd7a04a89
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.7.0

Code: Select all

$ dpkg -l libeigen3-dev
||/ Nom            Version      Architecture Description
+++-==============-============-============-=================================
ii  libeigen3-dev  3.0.5-1      amd64        lightweight C++ template library 
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Recompute routine in Sketcher

Post by bejant »

FWIW, still the same (fast) results with a newer FC build:

OS: Ubuntu 12.04.4 LTS
Word size: 32-bit
Version: 0.15.3782 (Git)
Branch: master
Hash: f0eb27f710aa74adf744d05fdf8c5d5ace62d386
Python version: 2.7.3
Qt version: 4.8.1
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.7.0
Post Reply