Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I'm trying to do some optimization based on interactive parameters, then compute and present stuff based on the optimized results. In trying to do that, I came across some strange behavior I can't figure out.

When I write either:

Manipulator[Dynamic[y], {0, 1}]
Dynamic[NMinimize[(z - y)^2, z]]

or even:

  Manipulator[Dynamic[y], {0, 1}]
  Dynamic[NMinimize[(z - y)^2, z]]

it runs incredibly slower than:

  NMinimize[(q - p)^2, q]
, {p, 0, 1}]    

The first two are much, much slower, to the point they slow down my whole session, and I can't figure out why. Any ideas on how to speed it up?

share|improve this question
With the simplistic examples given I don't notice anything being particularly slow. What version are you using? Could you give a more representative example? –  Mr.Wizard Aug 2 at 23:48
Michael, thanks for spotting that typo, but either function is slower, so it makes no difference for me. –  imh Aug 3 at 17:11
Mr.Wizard, I'm using It doesn't make things crazy slow, but (at least on my machine, a 4 year old macbook air) if you try typing while the Dynamic expression is running, there's a noticibly slower response. I'll put together a more representative example that isn't a hundred lines tonight. Thanks –  imh Aug 3 at 17:13
BTW, you need to put a @ in front of our names (e.g. @MichaelE2) for us to be notified of your response. The author of a question or answer always gets notified even without the @name. (I just happened to see the question come to the top of the stack and took a look.) –  Michael E2 Aug 3 at 17:31
I can't reproduce this either. –  Pickett Aug 5 at 21:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.