On Thu, Apr 30, 2009 at 7:14 AM, Jed Brown <span dir="ltr"><<a href="mailto:jed@59a2.org">jed@59a2.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Matthew Knepley wrote:<br>
> We should just treat LocalForm as GetArray, and increase the state on<br>
> RestoreLocalForm.<br>
<br>
</div>I thought of this, but like the maximum better. With GetArray, you<br>
don't have a nice way to determine whether the user changed anything, so<br>
the cache needs to be invalidated by default. When the user does not<br>
modify the array, the state is needlessly increased, hence the goofing<br>
with state in VecEqual.</blockquote><div><br>We could make a copy and do the same thing for GetArray. We don't because<br>it is more expensive. The same argument applies here. Some people will<br>complain about any unnecessary expense.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Increasing the state will work fine of course, but I think using the<br>
maximum is equally safe while making better use of cacheing. Also, if<br>
the global form has changed, I think we want the local form's state to<br>
increase in GetLocalForm.</blockquote><div><br>The local form is meaningless after restore so its state is unimportant.<br><br> Matt<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font color="#888888"><br>
Jed<br></font></blockquote></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>