cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

How to optimize sheet converted from MC15 to Prime

Joaberg
4-Participant

How to optimize sheet converted from MC15 to Prime

Hi,

 

I have a MC15 calculation-sheet of 200 pages that have been converted to Mathcad Prime 9.0 that runs extremely slowly and which im now looking to optimize. Changes in input that in MC15 would have taken 5-10 seconds to recalculate can now take upwards of 5 minutes or more before the sheet is updated.

 

I've been trying to read up on ways to speed up processing in Mathcad Prime and have read that size of matrices, the use of If-statements and possibly the use of "strings" in aforementioned matrices may be culprits.

 

Which optimizations do you believe would bring me the biggest improvements in calculation speed as opposed to how MC15 was working?

 

Does anyone have any recommendations how i should go about rewriting If-statements? (see attached picture of an example)

 

Im going to see if i can break up the sheet in parts and work on a part separately. Then i can also upload said part here for you to partake in.

 

Kind regards,

Johan

3 REPLIES 3

The very slow processing speed in Prime compared to that in Mathcad has often been criticized by users here in the forum. Even with more dramatic drops in performance than the one you describe (even if yours is bad enough).
It's hard to say which changes might bring the best speed gain - it's a case of trial and error, I guess.

 

PTC is obviously aware of the issue and there is a promise that improving speed would be a major focus in the development of the next Prime release. We will only be able to judge what this promise is worth next year...

Raiko
16-Pearl
(To:Joaberg)

Hi Johan,

 

here are my two pennies for your issue:

  • Don't divide repeatedly. Create a variable once that is the inverse of INTERVALL and multiply with that instead.
  • Try to use LOOKUP functions. I found them to be faster than comparisons.
  • Try to split up your combined AND / OR statements into single ones checking first for one condition and the the other one. That way the second subset of variables to be checked is smaller. 

Hope this helps because Prime's speed is glacial 😉

 

Raiko

JEckhardt
6-Contributor
(To:Joaberg)

I'm suffering the same realization.  Recently converted approx 350 page worksheet from 15 to Prime10.  I ended up breaking it up into 10 worksheets and even then, each one is operating at "glacial" speed (I like that term-thanks Raiko!).  I have a ton of if..then statements, approx 2 or 3 on every page.  I also have many string equations although I chopped a lot of those away, which means I have to manually duplicate descriptions and manually update changes.  The subsequent worksheets have to reference back to the original and previous worksheets to carry through some of the needed information and about 20% of the time, one of these references just quite working properly.  It is abysmal what they've done and if the performance doesn't improve soon, I'll have no choice than to entertain alternatives like Smath.  Good luck and if you discover any sure-fire tips on speed improvements, let us know!

 

Jeff

Top Tags