Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

** Community Tip** - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily.
X

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Jun 07, 2022
05:13 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jun 07, 2022
05:13 AM

Mathcad Prime is Laggy

Hello all, I believe I am suffering from a similar problem to a previous post;

Solved: Mathcad Prime worksheet Running Slow Compared to M... - PTC Community

I have a legacy calculation converted from Mathcad 15 that is mathematically very simple but approximately 170 pages long and as you will see from the attached is butchering my cpu. The aforementioned Prime calculation is consequently running painfully laggy and occasionally crashing.

Does anyone have any recommendations on a sensible procedure for processing such conversions that goes beyond the standard PTC Mathcad Migration guide?

For example, is it advantageous to break the calculation up into areas and disable them etc...

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

Jun 08, 2022
05:22 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jun 08, 2022
05:22 AM

Hi,

Well done to get the size down. By sections I mean insert the "point###:=time(0)" and "step[0:= etc.." by page 170 steps, or two pages at a time 85 steps, or reasonable calculation steps. Keep the file as one item.

This way a plot of timing in each step can show where to concentrate some effort in speeding up worksheet..

Cheers

Terry

8 REPLIES 8

Jun 07, 2022
05:21 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jun 07, 2022
05:21 AM

Hi,

If it is possible can the file be uploaded for review?

Cheers

Terry

Jun 07, 2022
05:31 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jun 07, 2022
05:31 AM

Hello Terry, thanks for the quick response.

I am unable to upload it for privacy reasons.

Jun 07, 2022
06:05 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jun 07, 2022
06:05 AM

Hi,

Understand the need for privacy.

Can only give general guidance.

If you are doing the same thing over and over try and vectorize it or use matrix arithmetic.

For instance the top truth table in matrix comparisons would be faster than the if statement.

Matrices - define the last element first as this avoids Prime resizing it.

Avoid for loops and use indices instead of programming.

For example large matrix first and indexing using range variables instead of for loops in programming.

The Prime below is complex and fast.

Memory management is smaller if you use programming for intermediate matrix and variable calculations as the local variables inside the function are deleted after program is run.

Cheers

Terry

Jun 07, 2022
08:24 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jun 07, 2022
08:24 AM

Thanks Terry that's great - I suspected a solution would involve matrices.

There's over 150 inputs, I'm tempted to shove them all in a column matrix for manipulation. Would this run faster because it is a single object?

Thanks,

Jw.

Jun 07, 2022
05:16 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jun 07, 2022
05:16 PM

Hi,

Because the 150 inputs are unlikely to involve the same processing one matrix is unlikely to do the job faster.

Would you consent to providing the worksheet to me via email so discussion of it is not public? I will not use or divulge the contents and can return it by email.

Cheers

Terry

Jun 07, 2022
05:41 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jun 07, 2022
05:41 PM

Hi,

170 pages can be broken into sections and put timing marks to determine where the slow bits are and concentrate on speeding up them.

Cheers

Terry

Jun 08, 2022
04:09 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jun 08, 2022
04:09 AM

Good morning Terry,

I managed to reduce the load on the cpu from 4.5GB to 2.5GB so it's working quicker.

By "sections", do you mean *areas/regions* or to break up the calculation into separate sheets and reference them? As I understand it there's no sub-routine functionality in Prime and also no *Ebook *functionality, like MC 15, for creating tables of contents.

Thank you so much again for the help!

John.

Jun 08, 2022
05:22 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jun 08, 2022
05:22 AM

Hi,

Well done to get the size down. By sections I mean insert the "point###:=time(0)" and "step[0:= etc.." by page 170 steps, or two pages at a time 85 steps, or reasonable calculation steps. Keep the file as one item.

This way a plot of timing in each step can show where to concentrate some effort in speeding up worksheet..

Cheers

Terry