Very slow recomputation - what am I doing wrong?

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!
moriraaca
Posts: 10
Joined: Thu Apr 21, 2022 4:59 pm

Very slow recomputation - what am I doing wrong?

Post by moriraaca »

Hi All. I'm working on a project which is big for my personal noob standards, but I don't think would be considered to be really big comparing to some showcases I've seen. The project was working mostly fine, but very recently it started being awfully slow, e.g. it takes a significant number of seconds to recompute everything everytime I make a single small change in a spreadsheet - and on other occasions too. My machine isn't exactly rubbish too - nothing crazy, but decent computation power with Ryzen 5 3600X and RX 5700 XT GPU. I haven't noticed when exactly those issues started, so I'm not sure what piece of the project exactly causes the slowdown.

Can anyone perhaps tell me if there's something wrong with how the project is made, perhaps I'm using features in unintended way or something? Or is it simply "how the things are", and the project of this size/caliber can't be sped up?

Thanks!

Project file is too big to attach - it's here

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 +148 (Git)
Build type: Release
Branch: Branch_0.19.4
Hash: 476ecf091941bead59b14e44afa6064d5a66afa3
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United Kingdom (en_GB)
User avatar
papyblaise
Veteran
Posts: 7870
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: Very slow recomputation - what am I doing wrong?

Post by papyblaise »

The error, if there is one, is to put all the elements in the same file
you have to make one file per part then assemble them in an assembly using one of the "Assemblies"
When you modify a value, only the part concerned is recalculated, the assembly will be when you open the file that contains it
User avatar
Forthman
Veteran
Posts: 2650
Joined: Fri Apr 27, 2018 11:23 am
Location: Tarn-et-Garonne (82)

Re: Very slow recomputation - what am I doing wrong?

Post by Forthman »

the massive use of spreadsheets causes significant slowdowns, especially if there are calculations in the cells.
Furthermore, even a small change to a sketch at the beginning of the model causes a cascading recalculation.

When we discover the use of Spreadsheets, it looks so powerful (and it is) that we tend to use
them too much, and this leads to models that are not very usable... :?
with a little practice we manage to find the right balance ;)
moriraaca
Posts: 10
Joined: Thu Apr 21, 2022 4:59 pm

Re: Very slow recomputation - what am I doing wrong?

Post by moriraaca »

Thank you both, that's very helpful.

I can definitely start splitting models into many files, sure - it shouldn't be a huge deal.

Spreadsheets beeing slow is not great news however :-( honestly, if I'm supposed to keep some of my constraints in spreadsheets, and some in sketches, I prefer to just have them all in sketches, it must be quite frustrating to look everytime at multiple sources to find where I need to adjust a value... This is even worse because by now means I'd call my spreadsheet usage "massive" :-) it's not a huge project after all.

One question - let's say I'll split one file into many files. I do need reference some models in many other places - e.g. in my project, I need to reference Lack Table dimensions very often. I could either import links to those models, or perhpas to spreadsheet with dimensions (I'm not sure if the latter is actually possible, but I think I've seen it is). BUT, since I'll kind of recreate dependencies between models, won't that reintroduce slow recomputations anyway?

One interesting question btw is why I've started experiencing the slowdown *now*. I mean, it was working more or less ok until very recently. Then I've added the last part ("filament-channel-adapter"), and suddenly I saw a huge spike in recomputations. And the last part wasn't even that big...
User avatar
Forthman
Veteran
Posts: 2650
Joined: Fri Apr 27, 2018 11:23 am
Location: Tarn-et-Garonne (82)

Re: Very slow recomputation - what am I doing wrong?

Post by Forthman »

all your elements are interconnected.
Look at the dependency graph, and you will understand (Tools menu)
Dependency graph.jpg
Dependency graph.jpg (579.25 KiB) Viewed 1761 times
Separating into several files will not improve performance if you want to keep using a common spreadsheet (on the contrary)

When I talk about intensive use of the spreadsheet, I don't mean the complexity of the final model, but the fact that you want to systematically define each element with dimensions in the spreadsheet.
Besides requiring more time to create, it is not that useful in the end.
For example, the profile of the part "plexi-channel-horizontal-body" is entirely defined in the spreadsheet, with the aim (I imagine) of being able to change its dimensions according to the parts found.
But what if the part found is not a "U" with equal lengths or thicknesses?
moriraaca
Posts: 10
Joined: Thu Apr 21, 2022 4:59 pm

Re: Very slow recomputation - what am I doing wrong?

Post by moriraaca »

Thank you for this insight. I'm definitely a noob in CADing, so perhaps that's my misconceptions acting up, but my understanding was that having a single point where you parametrize your models is kind of the point of parametric design. Perhaps that's also because of my software engineering background, where having a single place where you control all parameters is usually considered to be a good practice. I liked the idea that whenever I need to adjust a dimension I go to a single place, find the correct cell, and change it - knowing everything else will recompute correctly. I understand your point that sometimes the parts can change significantly, and then spreadsheet isn't helpful any more, but in my experience so far this was rare - I'm mostly finding myself fine-tunng some dimensions a little bit (maybe that's because I 3D print my models, so the physical dimensions are often a bit off and I need adjust them slightly).

I'm not saying my approach is "good" mind you, perhaps I need to change the way I look at the design process :-)
3dHacker
Posts: 35
Joined: Sun Aug 08, 2021 9:15 pm

Re: Very slow recomputation - what am I doing wrong?

Post by 3dHacker »

Version 20 Performance Problems

Sorry for posting this as a reply to another conversation, I don’t know how to start a new thread.

First off, FreeCAD is amazing. Like a lot of OpenSource software, it often ha some features ahead of the commercial products and lags in others. There some things that I think might be pretty easy to implement and would be quite handy, for me at least. I will say that 20 has been a bit more stable that 19 was and has handy new features, especially in TechDraw. Keep up the great work.

About a month and a half ago, I migrated from version 19. At first all was OK, but in the past two or three weeks, it has become real slow. Many things will take 2 or more minutes to do. I haven’t changed anything. Well, MicroSoft did do an update push, but I have not loaded any new software and have made no software or hardware configuration changes.

For example working through an exercise (not production work), model is ~1.75 MB with about 20 elements in the tree. While I do not have a lot of excess CPU and am a bit low on memory, it isn’t pegging either. Before starting FreeCAD, I am seeing 10% to 25% CPU with 65% to 75% memory committed. From a fresh restart of FreeCAD, I clicked on the icon on the Start page. It took 2:20 to load (I would have thought well less than 10 seconds). When it first started the model load, CPU spiked to about 70% then settled to between 40% and 50%. Once loaded, it fell back to 10% to 20%, that would have been for three-quarters of the loading time. All CPU percentages are total CPU load.

Just for comparison, loading this model in 19 took about half as long. My impression that, in general, most of the long running or slow functions ran in about half the time. But in 20, more of these functions have moved into the long running category.

This long processing times extend to almost everything you do, especially in TechDraws; Sections, Details etc. These often take several minutes to complete. It even occurs at shutdown! Clearly it is doing something that is using up time. Interestingly, it does NOT do any I/O (disk) during these functions, it just uses some CPU and takes a while. Is it waiting on something someplace? Where should I start looking for problems?

The model itself is clean with no Check Geometry errors. I started it from the console and got no messages.

It doesn’t seem to be related to this model, this has been going on for several weeks. I would attach my model but at 1.75 MB, the forum blocks it.

Agreed, at ten years old, this machine is not really up to contemporary standards but for two years running FreeCAD 19 it has been more than adequate. The main memory is at the architectural maximum and can not be increased.

When building a new model, at first it moves right along, but at some point, it really starts to slow down. It has gotten to the point where it is not very workable. Make one mouse click and go get a cup of coffee. Is this something that I am doing wrong? Is there a better way? Is anybody else experiencing anything like this? Does anybody have any suggestions?

The particulars:
Toshiba Satellite L775D
Processor AMD A6-3420M APU with Radeon(tm) HD Graphics 1.50 GHz
Installed RAM 8.00 GB (7.48 GB usable)
Device ID 4C733BC4-62C1-43C7-BB55-A3BECB7E21A5
Product ID 00326-10000-00000-AA252
System type 64-bit operating system, x64-based processor
Pen and touch No pen or touch input is available for this display

Windows:
Edition Windows 10 Home
Version 21H1
Installed on ‎7/‎22/‎2020
OS build 19043.1889
Experience Windows Feature Experience Pack 120.2212.4180.0


FreeCAD:
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
Locale: English/United States (en_US)
Installed mods:
* A2plus
* fasteners

Thanks
Alan
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Very slow recomputation - what am I doing wrong?

Post by thomas-neemann »

3dHacker wrote: Fri Aug 19, 2022 5:58 pm ...
I would rename the configuration files. If that doesn't help, I would create a full backup of the system and install xubuntu lts as a dual boot for freecad
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
chrisb
Veteran
Posts: 53928
Joined: Tue Mar 17, 2015 9:14 am

Re: Very slow recomputation - what am I doing wrong?

Post by chrisb »

Resetting the config is a good idea. To rule out the operating system: Do you still have the 0.19 version for comparison?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Very slow recomputation - what am I doing wrong?

Post by GeneFC »

3dHacker wrote: Fri Aug 19, 2022 5:58 pm Sorry for posting this as a reply to another conversation, I don’t know how to start a new thread.
New Topic.JPG
New Topic.JPG (33.92 KiB) Viewed 1375 times

Gene
Post Reply