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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Prime sucking up resources

RichardJ
19-Tanzanite

Prime sucking up resources

I just thought to myself that my computer seems a little sluggish, so I opened task manager to see what was going on. It seems the culprit is Prime. I only have one small Prime document open: two pages with a few bits of scribbling where I was trying things out. No big matrices, etc. Prime is currently using over 200Mb of RAM and 45% of my CPU time though! I am not even working in Prime, it's just got the one open worksheet in the background! Does anyone else see something similar?

Richard
13 REPLIES 13
RichardJ
19-Tanzanite
(To:RichardJ)

I just shut down Prime, then restarted it and reopened the worksheet. It's now sucking up 140Mb RAM and 5-10% of my CPU when it's just sitting in the background.

Richard
StuartBruff
23-Emerald III
(To:RichardJ)

On 8/24/2009 12:02:00 PM, rijackson wrote:
== I just shut down Prime, then restarted it and reopened the worksheet. It's now sucking up 140Mb RAM and 5-10% of my CPU when it's just sitting in the background.

It's simply following the first rule of software development - even when there's nothing to do, do something!

Stuart

Prime is nasty, but not so bad after all. By me it eats around 70MB without doing nothing.

Steen Gro�e

On my machine, WinXP, Prime 1.0 doesn't release memory when it opens a new file, so there's danger of running out. I have seen it swallow 1.5 GB after I did essentially nothing, but I haven't been able to reproduce that. As to cpu usage, I've only reliably seen the background processing after doing cut/paste operations. Pasting text from other programs or using the string operator after cut/paste (I accidentally hit " alot to create text regions)can cause the cpu to run at 100% on one core of my Core 2 duo. Deleting the string will get rid of the cpu usage, but deleting pasted text doesn't. I'm sure there are other things going on under the hood as well. Rebooting my machine seems to get rid of some things that restarting Prime 1.0 doesn't fix.

Among things that could fall under resource contention are a number of issues with the SDI implementatioin of the multi-document interface. Launching a separate process, with each sucking up resources, can cause issues - not to mention the problems with name clashes that also currently exist.

Robert

Yup, I often see it eat 50% of my cpu just sitting there, although occasionally it goes out for coffee or something and CPU useage goes to zero.

How funny - I sent this same bug to them Monday.

It occured when I left a sheet open over the weekend. The only thing it had on it was a solve block (a very simple one). So I can confirm that the issue reported happened on mine too.

Philip
___________________
Nobody can hear you scream in Euclidean space.

Nice to know I'm not the only one seeing it. Like you, when I first noticed it I had also left Prime open for a couple of days.

Like Albert, I have now also seen it occasionally go off for a cup of coffee and leave my poor PC in peace for a while.

Also, Roberts comment about cut-and-paste may be pertinent. During the couple of days it was open I am sure I must have done some cutting and pasting.

Something worth watching, to see if we can pin it down better.

Richard

Yep.

I repeated this again today. This time I was looking for it in the task manager.

I left the program open for about an hour (with no interaction). I created a Maths region, deleted it then I created a text box and typed a sentence in.

That's all it took for the CPU to then advance to 50%. Thinking back to my previous worksheet that got the error - it also had text boxes on it. Maybe that is the cause?

Philip
___________________
Nobody can hear you scream in Euclidean space.

Current status:

Prime has been up and running since sometime yesterday, during which time I have opened and closed several sheets, and done some editing and playing around. Currently though, I have one completely blank sheet open, nothing else. Prime has been in the background for several minutes, without me touching it.

Memory usage is 525Mb, and CPU usage is fluctuating between 5 and 15%.

Richard

Yep. Just having math regions on a brand new sheet causes continuous CPU usage. A sign of extremely poor coding technique, using some form of polling rather than being properly event driven (as Windows applications should be).
__________________
� � � � Tom Gutman

A .NET program shouldn't be doing any polling. That is actually true of any Windows program -- Windows provides for events in the form of messages and wait functions, and Windows programs should always be using those. But Mathcad has a long history of sloppy implementation (I put the huge number of incompatibilities with 3D graphs down to sloppy coding), and is known to use a polling loop in some cases (there is a thread about how performance is seriously reduced on a hyperthreaded P4 due to one of the virtual processors running a loop and interfering with the actual work).

Also, this cannot be a simple loop, as that would drive the CPU usage to 100% (on a uniprocessor basis) and the usage is well below that. Indicates that the loop includes some sort of delay -- typical of a polling loop, dificult to explain otherwise.

Quite possibly it is a scaling problem, somebody coded a delay in microseconds when milliseconds was intended. In which case it is likely that it will be "fixed" (actually just papered over) by increasing the poll interval to the point that the CPU usage is no longer so obvious.
__________________
� � � � Tom Gutman
mzeftel
12-Amethyst
(To:TomGutman)

The developers are investigating performance and memory issues now. Thank you for reporting on this. I've logged all your comments above.

If you have anything specific to add please send the details and worksheets to -.

I'd be interested if there are specific issues that cause performance problems that's not the normal type of issue like processing large matrices.

Someone mentioned an issue with text regions.

Thanks,

Mona
Announcements

Top Tags