Profiling lagrange.py

30 views
Skip to first unread message

Dhruv Mendiratta

unread,
Mar 8, 2020, 8:37:12 AM3/8/20
to sy...@googlegroups.com
I have attached an html file which show the results I am getting. Even though I have spent the past few days trying to understand the results I am not able to. The problem seems to  be that there are a large number of imports shown here all of which are in `sympy\__init__.py` or `sympy\physics\__init__.py` and I'm not able to find a way to get the time taken by functions inside `lagrange.py` itself. I understand that imports form a big chunk of time taken as they should, but the question remains on how could algorithmic performances be found in `lagrange.py` itself.
lagrange profile.html

Dhruv Mendiratta

unread,
Mar 8, 2020, 2:52:06 PM3/8/20
to sy...@googlegroups.com
Any help would be greatly appreciated.

Aaron Meurer

unread,
Mar 9, 2020, 4:11:58 PM3/9/20
to sympy
What are you trying to profile specifically?

You can also try using line profiler if you are trying to extract
individual lines that are slow.

Aaron Meurer

On Sun, Mar 8, 2020 at 12:52 PM Dhruv Mendiratta
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAFcc4sGS0NZ3W2ieOE0%3DmeG9%2Bi-8bn2uHwTPupc8ECwFnb78TQ%40mail.gmail.com.

Dhruv Mendiratta

unread,
Mar 10, 2020, 8:25:37 AM3/10/20
to sy...@googlegroups.com
I wanted to get an idea on how to carry out the project 'Efficient equation of motion generation' and hence wanted to find bottlenecks in the codebase, specifically the mechanics package. And as Mr. Jason Moore pointed out in an other email thread that things could be sped up by improving algorithms in modules like the matrix module. So I was trying to find such functions/modules which affect the performance of the mechanics package. I also tried cProfile but it wasn't much helpful either.

Reply all
Reply to author
Forward
0 new messages