Thread Subject:
Editing Large user Created MATLAB Functions

Subject: Editing Large user Created MATLAB Functions

From: sonnee sonnee

Date: 29 Jun, 2012 15:14:07

Message: 1 of 16

I cannot believe why MATLAB R2011b cannot accommodate regular editing speeds for large user defined functions or scripts. I am very frustrated by the lag that manifests when editing large functions.

From the current technological perspective, it is unacceptable and should be addressed by MATLAB.

Subject: Editing Large user Created MATLAB Functions

From: Steven_Lord

Date: 29 Jun, 2012 17:27:44

Message: 2 of 16



"sonnee sonnee" <sonnees@hotmail.com> wrote in message
news:jskgnv$co0$1@newscl01ah.mathworks.com...
> I cannot believe why MATLAB R2011b cannot accommodate regular editing
> speeds for large user defined functions or scripts. I am very frustrated
> by the lag that manifests when editing large functions.
>
> From the current technological perspective, it is unacceptable and should
> be addressed by MATLAB.

If you have Code Analyzer enabled, it's analyzing your entire
function/script looking for syntax errors or inefficiencies as you type.
While you could disable Code Analyzer, I would suggest instead breaking your
large function or script into multiple smaller function or script files.
This will have benefits above and beyond allowing Code Analyzer to more
quickly analyzer your code, including understandability, readability, and
testability. IMO ten 100-line functions are generally easier to understand
than one 1000-line function.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: Editing Large user Created MATLAB Functions

From: sonnee sonnee

Date: 2 Jul, 2012 18:26:06

Message: 3 of 16

"Steven_Lord" <slord@mathworks.com> wrote in message <jskoig$eao$1@newscl01ah.mathworks.com>...
>
>
> "sonnee sonnee" <sonnees@hotmail.com> wrote in message
> news:jskgnv$co0$1@newscl01ah.mathworks.com...
> > I cannot believe why MATLAB R2011b cannot accommodate regular editing
> > speeds for large user defined functions or scripts. I am very frustrated
> > by the lag that manifests when editing large functions.
> >
> > From the current technological perspective, it is unacceptable and should
> > be addressed by MATLAB.
>
> If you have Code Analyzer enabled, it's analyzing your entire
> function/script looking for syntax errors or inefficiencies as you type.
> While you could disable Code Analyzer, I would suggest instead breaking your
> large function or script into multiple smaller function or script files.
> This will have benefits above and beyond allowing Code Analyzer to more
> quickly analyzer your code, including understandability, readability, and
> testability. IMO ten 100-line functions are generally easier to understand
> than one 1000-line function.
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

Steve,

Thanks for the reply.

I do normally work with smaller functions but on this occasion I am using the MATLAB function as a standalone routine and as such, I am limited by the need for a self-contained function.

Even with the Code Analyzer disabled, the editing is still excruciatingly slow.

Thanks.

Subject: Editing Large user Created MATLAB Functions

From: james bejon

Date: 2 Jul, 2012 21:46:06

Message: 4 of 16

> I do normally work with smaller functions but on this occasion I am using the MATLAB function as a standalone routine and as such, I am limited by the need for a self-contained function.
>
> Even with the Code Analyzer disabled, the editing is still excruciatingly slow.
>
> Thanks.

I agree. It's a real frustration--the only real complaint I have with Matlab in fact. There are times when long functions are quite appropriate and quite clear.

Subject: Editing Large user Created MATLAB Functions

From: Steven_Lord

Date: 3 Jul, 2012 20:41:45

Message: 5 of 16



"sonnee sonnee" <sonnees@hotmail.com> wrote in message
news:jssp3u$ntj$1@newscl01ah.mathworks.com...
> "Steven_Lord" <slord@mathworks.com> wrote in message
> <jskoig$eao$1@newscl01ah.mathworks.com>...

*snip*

> Steve,
>
> Thanks for the reply.
>
> I do normally work with smaller functions but on this occasion I am using
> the MATLAB function as a standalone routine and as such, I am limited by
> the need for a self-contained function.
> Even with the Code Analyzer disabled, the editing is still excruciatingly
> slow.

In that case, you should probably contact Technical Support and work with
them to determine the cause and hopefully how to correct the problem.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: Editing Large user Created MATLAB Functions

From: dpb

Date: 3 Jul, 2012 21:26:31

Message: 6 of 16

On 7/2/2012 4:46 PM, james bejon wrote:
>> I do normally work with smaller functions but on this occasion I am
>> using the MATLAB function as a standalone routine and as such, I am
>> limited by the need for a self-contained function.
>> Even with the Code Analyzer disabled, the editing is still
>> excruciatingly slow.
>>
>> Thanks.
>
> I agree. It's a real frustration--the only real complaint I have with
> Matlab in fact. There are times when long functions are quite
> appropriate and quite clear.

While Steven's suggestion to consult, hobnob and otherwise consort w/
the Tech Support gurus is undoubtedly the way to (hopefully) get some
relief in Matlab, the quickest way to actually resolve edit hangups is
to go to an outside program editor.

That has the disadvantage of not having the close tie-in w/ the rest of
Matlab of course, but several have at least a modicum of m-file support
and certainly can edit large files w/o any noticeable slowdown.
(Programming editors and choices being what they are, I'm not going to
mention which are my favorites... :) )

I presume (and that's all it is) is that the problem is a combination of
the overhead the builtin functionality tied in w/ java...which is also
why I'm guessing there's not going to be a whole lot they can tell you
in the short term inside the builtin editor, unfortunately. Hopefully
I'm wrong... :)

$0.015, imo, etc., etc., etc., ...

--

Subject: Editing Large user Created MATLAB Functions

From: sonnee sonnee

Date: 6 Jul, 2012 00:14:17

Message: 7 of 16

My only viable solution to this frustrating problem is to extract the pertinent segment of code into a new function window, edit it and then return it to the original function.

I reiterate, in view of the cost of this software, it is reasonable to expect full base functionality without being shepherded into particular coding practises.

A large function is not unusual coding practise. In fact, I code standalone functions that contain other functions. This allows me to understand program flow better without the need to open multiple windows for associated functions utilized by the main.

It appears that this ongoing issue continues to be ignored in recent releases of the GUI. Yes, it is an all bells and whistles editor as long as your code is within a 1000 line threshold.

MATLAB can perform all manner of complex mathematical tasks and yet it is unable to permit a 1000+ line script or function to be edited in a peaceable manner.

Outstanding.

Perhaps MATLAB needs to take a look at the editor in MS Visual Studio that outperforms it by an order of magnitude while maintaining the same functionality.

Subject: Editing Large user Created MATLAB Functions

From: dpb

Date: 6 Jul, 2012 01:14:13

Message: 8 of 16

On 7/5/2012 7:14 PM, sonnee sonnee wrote:
> My only viable solution to this frustrating problem is to extract the
> pertinent segment of code into a new function window, edit it and then
> return it to the original function.

I don't see why that is so, necessarily...

> I reiterate, in view of the cost of this software, it is reasonable to
> expect full base functionality without being shepherded into particular
> coding practises.

...

>
> MATLAB can perform all manner of complex mathematical tasks and yet it
> is unable to permit a 1000+ line script or function to be edited in a
> peaceable manner.
>
> Outstanding.
> Perhaps MATLAB needs to take a look at the editor in MS Visual Studio
> that outperforms it by an order of magnitude while maintaining the same
> functionality.

Don't shoot the messenger; I'm not disagreeing w/ you nor defending TMW;
just commenting... :)

I do think for just edit functions if the size is an issue you really
should consider using an outside editor for that purpose and the builtin
one only for checking and its interaction. I'll grant that's not ideal
by any stretch but it would, I think speed up the process overall and be
more convenient than the cut'n-paste alternative you outline.

In fact, there's no reason you couldn't select the VisualStudio editor
is there if you like it (I don't, but that's again the personal
preference thingie; I've got 30 years invested in a particular
programming editor and its keybindings as well as specific
language-dependent customizations I've made that I'm unwilling to give up).

Sure, it's frustrating to have the investment that Matlab is and have to
do something of the sort, but imo one has to make the best of the
situation as it is and if one is going to use Matlab then that's the
best it is at the moment.

Current users continuing to put pressure on to improve is key, of course...

Wish I had a better solution/answer.

--

Subject: Editing Large user Created MATLAB Functions

From: Steven_Lord

Date: 6 Jul, 2012 13:53:19

Message: 9 of 16



"sonnee sonnee" <sonnees@hotmail.com> wrote in message
news:jt5akp$8lg$1@newscl01ah.mathworks.com...
> My only viable solution to this frustrating problem is to extract the
> pertinent segment of code into a new function window, edit it and then
> return it to the original function.

No, one solution is to contact Technical Support as I recommended and work
with them to determine WHY the Editor is behaving so slowly for your large
function. If the cause is a bug, I want to know so that we can fix it! If
it's not a bug, if the problem is related to some aspect of your system
configuration, they can help you identify that and (depending on the actual
cause) correct the issue.

If the cause is an overzealous virus scanner scanning the file every time it
changes (after every line or every character), then modifying the virus
scanner settings would likely reduce or eliminate the slowdown.
If the cause is network latency on an oversaturated network, then editing a
local copy would likely speed things up.
Running on a machine with a small amount of memory? Memory contention could
cause swapping and a slowdown.
Misconfigured X server on Linux? There's a Technical Support solution
document describing that issue and a solution:

http://www.mathworks.com/support/solutions/en/data/1-98R1XN/index.html?solution=1-98R1XN


The point I'm trying to make is that there is NO WAY to know what's going on
without doing some investigation, and Technical Support is the right group
of people to work with you to do that investigation. Don't convict the
Editor before it has had its day in court.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: Editing Large user Created MATLAB Functions

From: Doug Schwarz

Date: 6 Jul, 2012 16:34:12

Message: 10 of 16

On 7/5/2012 8:14 PM, sonnee sonnee wrote:
> It appears that this ongoing issue continues to be ignored in recent
> releases of the GUI. Yes, it is an all bells and whistles editor as long
> as your code is within a 1000 line threshold.
>
> MATLAB can perform all manner of complex mathematical tasks and yet it
> is unable to permit a 1000+ line script or function to be edited in a
> peaceable manner.

I was wondering how long your function were that have a problem. It
does seem as though one of the issues mentioned by Steve could be the
problem. I regularly edit m-files with 3000 lines or more with no
noticeable slowdown whatsoever. I urge you to investigate further.


--
Doug Schwarz
dmschwarz&ieee,org
Make obvious changes to get real email address.

Subject: Editing Large user Created MATLAB Functions

From: sonnee sonnee

Date: 6 Jul, 2012 18:20:08

Message: 11 of 16

"Steven_Lord" <slord@mathworks.com> wrote in message <jt6qkf$lvl$1@newscl01ah.mathworks.com>...
>
>
> "sonnee sonnee" <sonnees@hotmail.com> wrote in message
> news:jt5akp$8lg$1@newscl01ah.mathworks.com...
> > My only viable solution to this frustrating problem is to extract the
> > pertinent segment of code into a new function window, edit it and then
> > return it to the original function.
>
> No, one solution is to contact Technical Support as I recommended and work
> with them to determine WHY the Editor is behaving so slowly for your large
> function. If the cause is a bug, I want to know so that we can fix it! If
> it's not a bug, if the problem is related to some aspect of your system
> configuration, they can help you identify that and (depending on the actual
> cause) correct the issue.
>
> If the cause is an overzealous virus scanner scanning the file every time it
> changes (after every line or every character), then modifying the virus
> scanner settings would likely reduce or eliminate the slowdown.
> If the cause is network latency on an oversaturated network, then editing a
> local copy would likely speed things up.
> Running on a machine with a small amount of memory? Memory contention could
> cause swapping and a slowdown.
> Misconfigured X server on Linux? There's a Technical Support solution
> document describing that issue and a solution:
>
> http://www.mathworks.com/support/solutions/en/data/1-98R1XN/index.html?solution=1-98R1XN
>
>
> The point I'm trying to make is that there is NO WAY to know what's going on
> without doing some investigation, and Technical Support is the right group
> of people to work with you to do that investigation. Don't convict the
> Editor before it has had its day in court.
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

Well, I also work with MS Visual Studio and have functions that are equally large but have absolutely no problem with editing. The MS VS editor is comparable to the MATLAB editor in terms of functionality and yet comfortably allows editing of large functions or code on identical systems.

My purpose is not to convict any software, only to point out a common problem that appears not to be given the attention it deserves.

It really should not require the customer of any software to highlight problems to the programming house, that is why beta-testing exists.

Subject: Editing Large user Created MATLAB Functions

From: dpb

Date: 6 Jul, 2012 19:24:11

Message: 12 of 16

On 7/6/2012 1:20 PM, sonnee sonnee wrote:
...

> My purpose is not to convict any software, only to point out a common
> problem that appears not to be given the attention it deserves.
> It really should not require the customer of any software to highlight
> problems to the programming house, that is why beta-testing exists.

But, if your objective is to edit large files in Matlab comfortably then
it seems self-defeating to not take the advice proferred.

What VisualStudio does (or does not do) on your machine had no bearing
on Matlab. I'm sure if the situation were reversed it wouldn't make
much difference to Microsoft that Matlab editor ran rings around it as
far as finding a solution for the issue a user might be having with VS.

So, while I suggested using else as a workaround, I certainly want
Steven to know I'm in agreement with his assessment and didn't intend
for my previous posting to sound as much like throwing TMW under the bus
as it turned out it does/did...

Call/email Tech Support...they can't help if they don't get the chance.

--

Subject: Editing Large user Created MATLAB Functions

From: Bruno Luong

Date: 6 Jul, 2012 19:27:17

Message: 13 of 16

"sonnee sonnee" wrote in message <jt7a8o$qf3$1@newscl01ah.mathworks.com>...
> "Steven_Lord" <slord@mathworks.com> wrote in message <jt6qkf$lvl$1@newscl01ah.mathworks.com>...

>
> My purpose is not to convict any software, only to point out a common problem that appears not to be given the attention it deserves.

Common problem? I see isolated complain, and many of us do not have the problem with editing large file.

So the problem is not (yet) reproducible, and it is not clear if it's due to editor or user system related.

Please reread your first post, you clearly pointed Matlab 2011b for responsible, without being certain what causes the issue.

Bruno

Subject: Editing Large user Created MATLAB Functions

From: james bejon

Date: 7 Jul, 2012 01:30:21

Message: 14 of 16

A while back I spoke to one of the Tech Support guys about this very issue. According to them, it is in fact a common problem. The best they could do was send me a patch that disabled some of the editor's functionality. (Unfortunately, I never ended up running them--issues with our internal IS department!).

Subject: Editing Large user Created MATLAB Functions

From: sonnee sonnee

Date: 7 Jul, 2012 01:53:25

Message: 15 of 16

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <jt7e6l$cob$1@newscl01ah.mathworks.com>...
> "sonnee sonnee" wrote in message <jt7a8o$qf3$1@newscl01ah.mathworks.com>...
> > "Steven_Lord" <slord@mathworks.com> wrote in message <jt6qkf$lvl$1@newscl01ah.mathworks.com>...
>
> >
> > My purpose is not to convict any software, only to point out a common problem that appears not to be given the attention it deserves.
>
> Common problem? I see isolated complain, and many of us do not have the problem with editing large file.
>
> So the problem is not (yet) reproducible, and it is not clear if it's due to editor or user system related.
>
> Please reread your first post, you clearly pointed Matlab 2011b for responsible, without being certain what causes the issue.
>
> Bruno

I am not sure what you mean by your last statement. What I do know is that this is fast becoming a hounding exercise.

If you would care to know, I took the advice that was offered by checking my system configuration for possible causes and I am quite convinced that it is not my platform.

I work at a very large engineering company in the USA and most, if not all of the people that use MATLAB in my department have the same problem with editing large files. So, no it is not an isolated incident and it IS reproduceable. Also, I have sufficient reason to believe that others elsewhere are experiencing the same problem.

My comparison with the MS VS editor is justified despite what is being disposed to the contrary. We are talking about an editor, not a numerical solver. These problems should not exist in any editor and, as far as I have experienced, no other IDE editor exhibits the same problem.

I am not averse to learned advice. I have not as yet followed up with MATLAB Technical Support. I have a finite number of working hours in the field in which I work, and I consider calling this in to be quite low on my priority list currently.

Regardless, my stand is clear and I reiterate : It really should not require the customer of any software to highlight problems to the programming house, that is why beta-testing exists.

This will be my last post on this issue.

Subject: Editing Large user Created MATLAB Functions

From: Steven_Lord

Date: 9 Jul, 2012 14:12:20

Message: 16 of 16



"sonnee sonnee" <sonnees@hotmail.com> wrote in message
news:jt84ql$2ik$1@newscl01ah.mathworks.com...
> "Bruno Luong" <b.luong@fogale.findmycountry> wrote in message
> <jt7e6l$cob$1@newscl01ah.mathworks.com>...
>> "sonnee sonnee" wrote in message
>> <jt7a8o$qf3$1@newscl01ah.mathworks.com>...
>> > "Steven_Lord" <slord@mathworks.com> wrote in message
>> > <jt6qkf$lvl$1@newscl01ah.mathworks.com>...
>>
>> >
>> > My purpose is not to convict any software, only to point out a common
>> > problem that appears not to be given the attention it deserves.
>>
>> Common problem? I see isolated complain, and many of us do not have the
>> problem with editing large file. So the problem is not (yet)
>> reproducible, and it is not clear if it's due to editor or user system
>> related.
>>
>> Please reread your first post, you clearly pointed Matlab 2011b for
>> responsible, without being certain what causes the issue.
>>
>> Bruno
>
> I am not sure what you mean by your last statement. What I do know is that
> this is fast becoming a hounding exercise.
> If you would care to know, I took the advice that was offered by checking
> my system configuration for possible causes and I am quite convinced that
> it is not my platform.
>
> I work at a very large engineering company in the USA and most, if not all
> of the people that use MATLAB in my department have the same problem with
> editing large files. So, no it is not an isolated incident and it IS
> reproduceable. Also, I have sufficient reason to believe that others
> elsewhere are experiencing the same problem.

Given this and the prioritization issue you mention below, perhaps you could
escalate this issue to your IT staff and have them work with Technical
Support to investigate if there's some larger issue (network configuration,
an interaction between MATLAB and the specific hardware/software that make
up your standard machine configuration, etc.) that's causing this behavior.
It obviously should NOT be happening,

*snip*

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us