FreeCAD / FreeCAD

This is the official source code of FreeCAD, a free and opensource multiplatform 3D parametric modeler.
https://www.freecad.org
Other
18.83k stars 3.95k forks source link

Performance Evalution Tool #6235

Open FreeCAD-Bug-Importer opened 2 years ago

FreeCAD-Bug-Importer commented 2 years ago

Issue imported from https://tracker.freecad.org/view.php?id=4691

Original report text

In Solidworks there was a tool called the Performance Evaluation Tool that allowed the user to analyze what was taking up the most processing time (e.g. on startup when loading the model, on the equivalent of a recompute in FreeCAD (rebuild in Solidworkd), etc.). It would show things like which parts or features took the most time and or processing to handle such that the user could locate these things and either reduce their complexity, or some other workaround to improve performance.

A link to the forum discussing this idea here: https://forum.freecadweb.org/viewtopic.php?p=513242#p513242

A link to the documentation on Solidworks is here for reference: https://help.solidworks.com/2021/English/SolidWorks/sldworks/HIDD_ASSYXPERT_REBUILD_REPORT.htm?verRedirect=1

Steps to reproduce

I'm not familiar with the code base (yet), but from the little I skimmed I was thinking about this being implemented via the following items:

  1. In whatever base/parent class that defines a Part Design feature (pad, pocket, polar pattern, etc.) have some field that tracks most recent recompute time for that feature. Add this field to the Property Pane when selected in the tree view.
  2. Add a tic/tok timer or similar to the beginning and end of the recompute method from which to update the above mentioned field storing this info. Add a user-preference or other boolean to toggle this timer on/off if it slows performance.
  3. Add the ability to generate a report of some kind (pdf/spreadsheet/console log/etc.) that gathers this recompute time for each existing feature into one place. Sort these by recompute time so the user can identify which features are taking the most time to recompute.

FreeCAD Info

OS: Ubuntu Core 20 (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Unknown
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.5
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.5.0
Locale: English/United States (en_US)

Other bug information

adrianinsaval commented 2 years ago

If I'm not mistaken there's a macro around for this