benchmarking comparing peformance of freecad mac app bundles

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!
Post Reply
User avatar
ipatch
Posts: 112
Joined: Wed Apr 08, 2020 3:40 pm
Location: dfw
Contact:

benchmarking comparing peformance of freecad mac app bundles

Post by ipatch »

i've been trying to keep the homebrew-freecad tap updated, and published a DMG release of mac app bundle ie. a `FreeCAD.app` that should just work by double clicking the app icon after drag n drop to the `/Applications` folder.

i was curious about the load time of a file i've been working with that takes ~ 24 seconds to load on my system using the app bundle i built and published to the github / releases section of the homebrew-freecad tap.

conveniently enough my app bundle appears to be the same build number (commit) as that of the conda weekly release. (how that happened, i have no idea (divine intervention)). either way, the conda release is able to load my file in ~ 20 seconds. not much of a difference to make a deal breaker. but curious enough (wish i could insert cat emoji without blowing up the browser rendering(phpbb you suck)).

...is there a way to test / analyze / benchmark freecad, ie. like see what it is that is taking the bulk of the time to load the file?

and i am aware of the `freecad -t 0` command but am wondering if there any other way to analyze / "instrument" the build to see what could possibly be slowing things down.
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: benchmarking comparing peformance of freecad mac app bundles

Post by TheMarkster »

ipatch wrote: Sat Oct 23, 2021 4:45 pm ...is there a way to test / analyze / benchmark freecad, ie. like see what it is that is taking the bulk of the time to load the file?

and i am aware of the `freecad -t 0` command but am wondering if there any other way to analyze / "instrument" the build to see what could possibly be slowing things down.
There is a macro for profiling how long it takes to recompute the document. It show the recompute time for each object that was recomputed.

It's called Recompute Profiler

Usage: Run the macro the first time to block recomputes from happening. Change some property of each object to be recomputed. Run the macro again. Check the report view for results.
User avatar
jonasb
Posts: 162
Joined: Tue Dec 22, 2020 7:57 pm

Re: benchmarking comparing peformance of freecad mac app bundles

Post by jonasb »

My poor-man's approach is usually: Send an object to the python console (from the context menu in the tree) and then

Code: Select all

from time import perf_counter
start = perf_counter(); obj.recompute(); perf_counter() - start
But it gives you only end-to-end durations; so not the kind of profiling info you asked for
Post Reply