Path: news.mathworks.com!not-for-mail
From: "Yair Altman" <altmanyDEL@gmailDEL.comDEL>
Newsgroups: comp.soft-sys.matlab
Subject: Re: MATLAB sluggish after extended use on mac.
Date: Tue, 29 Jan 2013 07:15:08 +0000 (UTC)
Organization: TACT Computer Systems Ltd
Lines: 15
Message-ID: <ke7sts$k2n$1@newscl01ah.mathworks.com>
References: <ke6kg4$pia$1@newscl01ah.mathworks.com>
Reply-To: "Yair Altman" <altmanyDEL@gmailDEL.comDEL>
NNTP-Posting-Host: www-00-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1359443708 20567 172.30.248.45 (29 Jan 2013 07:15:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 29 Jan 2013 07:15:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 642467
Xref: news.mathworks.com comp.soft-sys.matlab:787652

"Joseph " <sarnelle@gmail.com> wrote in message <ke6kg4$pia$1@newscl01ah.mathworks.com>...
> I'm running MATLAB R2012a on my mid 2010 Macbook Pro (2.66 GHz i7, 8GB RAM)
> 
> When I first open MATLAB and do some work it runs quickly, but after an hour or two of work, it becomes very sluggish and delayed (the time between clicking or typing something and the action actually being performed increases). 
> 
> The only solution I've found (more of a workaround) is completely killing the application and opening it again. Does anybody have any idea as to why this happens?


This sounds like a memory-related issue: either a typical Matlab memory leak situation, or due to extensive fragmentation. In both cases there is no easy solution other than to restart Matlab and/or the computer. (Matlab once suggested using the pack command but this is not really of any practical use)

One specific case where you might have an easier solution is if you're extensively using GUI and graphics. Many of Matlab's memory leaks are due to graphics and GUI. In such cases reusing the same graphic objects (e.g., don't create new figures and graphs but reuse existing ones by modifying their data) may delay the inevitable.

Yair Altman 
http://UndocumentedMatlab.com