I have 8 variables to be manipulated, and it costs a lot of CPU power to have this dynamic environment standby all the time, being refreshed when it's not needed.
It's not that the evaluation is slow, it's the Manipulate working hard at "idling" so that my entire computer is slow to respond to any action.
Even though in my Manipulate environment, I have set all the variables to discrete step of 1 (with each having range of about 100), the load is still too heavy.
I remember seeing in the documentation long ago an option for Dynamic[ something ] with a coder specified rate of update (esp. useful in 3-dim graphics), but I cannot locate where it is now.
How do I set Manipulate refresh time to e.g. once per second? (note that this is not about the rate of animation)
I feel like this should be just a basic command. Any pointer would be appreciated. Thanks for your time.
Below is a reduced version of my actual code. It appears not as minimal as one would like, but I guess the point is to include all the possible problematic parts.
bigN = 160; ImgSz = 400;
Manipulate[
data = { { {x111, x112}, {x121, x122}
}, {{x211, x212}, {x221, x222} } };
s = 1/2;
sT = -5/3 s; sP = 6/5 sT;
Graphics3D[{
{ Red, Opacity[0.2], Polygon[{
{sP, -s, -s}, {sP, -s, 1 + s}, {sP, 1 + s, 1 + s}, {sP,
1 + s, -s}
}]}
, myStyle = Style[#, Background -> White, FontSize -> 28] &;
Table[ Text[ data[[1 + i, 1 + j, 1 + k]] // myStyle, {i, j, k} ]
, {i, 0, 1}, {j, 0, 1}, {k, 0, 1} ]
}, ImageSize -> ImgSz,
BoxRatios -> {4, 3, 2}
, Axes -> True , AxesLabel -> {"X", "Y", "Z"}]
, Grid[{
{Control[{
{x112, bigN/8, "Up11"}, bigN/16, (3 bigN)/16, 1
}], Spacer[20]
, Control[{
{x122, bigN/8, "Up12"}, bigN/16, (3 bigN)/16, 1
}] }, {Control[{
{x212, bigN/8, "Up21"}, bigN/16, (3 bigN)/16, 1
}], Spacer[20]
, Control[{
{x222, bigN/8, "Up22"}, bigN/16, (3 bigN)/16, 1
}]
} } ], Grid[{ (* lower layer *)
{Control[{
{x111, bigN/8, "Low11"}, bigN/32, bigN/4, 1
}], Spacer[20]
, Control[{
{x121, bigN/8, "Low12"}, bigN/32, bigN/4, 1
}] }, {Control[{
{x211, bigN/8, "Low21"}, bigN/32, bigN/4, 1
}], Spacer[20]
, Control[{
{x221, bigN/8, "Low22"}, bigN/32, bigN/4, 1
}]
} } ], ControlPlacement -> {Top, Bottom}]
Imgsz
. I made it 400 and every runs OK. I am not seeing much system performance degradation. $\endgroup$