-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed up model parsing #208
Comments
@MauriceHendrix would you be up for doing some profiling on e.g. regenerating the Chaste codegen references, so we have some data to guide optimisation? I have a couple of ideas for improving the performance of
|
sure would be interested. Also in codegen in a few places I add stuff to the model and than just use get_equatons_for again. It would probably be faster if I just updated the list I already had, but that would be quite a bit of extra work. |
I just ran a cprofile on load_model. By far the biggest time sinks are random, shuffle and xreplace. I wonder where random is being used from. For xreplace we know it's much faster than subs, but even so is there a way to reduce calls to xreplace? ncalls tottime percall cumtime percall filename:lineno(function) |
Probably useful to see the call graph, since there are various places we call into Sympy! |
@jonc125 I tried both suggestions for cellmlmanip and the results are pretty disappointing:
|
Right @jonc125 and @MichaelClerx
|
Currently this is very very slow. For example, Myokit is approx ~30 times faster (only checked one file). We should do some profiling to see what causes this, and then check if there's some easy fixes to speed things up
The text was updated successfully, but these errors were encountered: