Skip to content

Commit

Permalink
snapshot for posterity
Browse files Browse the repository at this point in the history
  • Loading branch information
markcmiller86 committed Dec 19, 2024
1 parent 2a81a18 commit 42da2b4
Show file tree
Hide file tree
Showing 5 changed files with 198 additions and 6 deletions.
8 changes: 6 additions & 2 deletions src/doc/python_scripting/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1899,7 +1899,9 @@ SuspendGUIUpdates
SuspendGUIUpdates() -> integer

return type : CLI_return_t
The SuspendGUIUpdates function returns 1 on success and 0 on failure.
The SuspendGUIUpdates function returns whatever the preceding state was.
If the preceding state was that GUI updates were suspended, it returns a 1.
Otherwise, it returns a 0.

**Description:**

Expand Down Expand Up @@ -1927,7 +1929,9 @@ ResumeGUIUpdates
ResumeGUIupdates() -> integer

return type : CLI_return_t
The ResumeGUIUpdates function returns 1 on success and 0 on failure.
The ResumeGUIUpdates function returns whatever the preceding state was.
If the preceding state was that GUI updates were suspended, it returns a 1.
Otherwise, it returns a 0.

**Description:**

Expand Down
120 changes: 120 additions & 0 deletions src/resources/help/en_US/relnotes3.5.0.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>VisIt 3.5 Release Notes</title>
</head>
<body>

<center><b><font size="6">VisIt 3.5 Release Notes</font></b></center>

<p>Welcome to VisIt's release notes page. This page describes the important
enhancements and bug-fixes that were added to this release.</p>

<p><b>Sections</b></p>
<ul>
<li><a href="#General_features">Features for all users</a></li>
<li><a href="#Advanced_features">Features for advanced users</a></li>
<li><a href="#GUI_changes">Changes in GUI behavior</a></li>
<li><a href="#CLI_changes">Changes in CLI behavior</a></li>
<li><a href="#File_format">Changes to file format readers</a></li>
<li><a href="#Plot_changes">Changes to plots</a></li>
<li><a href="#Operator_changes">Changes to operators</a></li>
<li><a href="#Expression_changes">Changes to expressions</a></li>
<li><a href="#Query_changes">Changes to picks and queries</a></li>
<li><a href="#Bugs_fixed">Other bug fixes</a></li>
<li><a href="#Build_features">Changes to build_visit</a></li>
<li><a href="#Dev_changes">Changes for VisIt developers</a></li>
</ul>

<a name="General_features"></a>
<p><b><font size="4">General features added in version 3.5</font></b></p>
<ul>
<li>General Feature 1</li>
<li>General Feature 2</li>
</ul>

<a name="Advanced_features"></a>
<p><b><font size="4">Advanced features added in version 3.5</font></b></p>
<ul>
<li>Advanced Feature 1</li>
<li>Advanced Feature 2</li>
</ul>

<a name="GUI_changes"></a>
<p><b><font size="4">Changes in GUI behavior for version 3.5</font></b></p>
<ul>
<li>GUI Change 1</li>
<li>GUI Change 2</li>
</ul>

<a name="CLI_changes"></a>
<p><b><font size="4">Changes in CLI behavior for version 3.5</font></b></p>
<ul>
<li>Two new methods, <code>SuspendGUIUpdates()</code> and <code>ResumeGUIUpdates()</code> were added to the CLI to improve performance when defining a large number of expressions.</li>
<li>CLI Change 2</li>
</ul>

<a name="File_format"></a>
<p><b><font size="4">File format reader changes in version 3.5</font></b></p>
<ul>
<li>File Format 1</li>
<li>File Format 2</li>
</ul>

<a name="Plot_changes"></a>
<p><b><font size="4">Changes to VisIt's plots in version 3.5</font></b></p>
<ul>
<li>Plot Change 1</li>
<li>Plot Change 2</li>
</ul>

<a name="Operator_changes"></a>
<p><b><font size="4">Changes to VisIt's operators in version 3.5</font></b></p>
<ul>
<li>Operator Change 1</li>
<li>Operator Change 2</li>
</ul>

<a name="Expression_changes"></a>
<p><b><font size="4">Changes to VisIt's expression language in version 3.5</font></b></p>
<ul>
<li>Expression Change 1</li>
<li>Expression Change 2</li>
</ul>

<a name="Query_changes"></a>
<p><b><font size="4">Changes to VisIt's picks and queries in version 3.5</font></b></p>
<ul>
<li>Query Change 1</li>
<li>Query Change 2</li>
</ul>

<a name="Bugs_fixed"></a>
<p><b><font size="4">Other bugs fixed in version 3.5</font></b></p>
<ul>
<li>Bug Fix 1</li>
<li>Bug Fix 2</li>
</ul>

<a name="Build_features"></a>
<p><b><font size="4">Changes to build_visit in version 3.5</font></b></p>
<ul>
<li>Build Feature 1</li>
<li>Build Feature 2</li>
</ul>

<a name="Dev_changes"></a>
<p><b><font size="4">Changes for VisIt developers in version 3.5</font></b></p>
<ul>
<li>Developer Change 1</li>
<li>Developer Change 2</li>
</ul>

<p>Click the following link to view the release notes for the previous version
of VisIt: <a href=relnotes3.4.3.html>3.4.3</a>.</p>
</body>
</html>
60 changes: 60 additions & 0 deletions src/test/tests/unit/expr_loop.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: expr_loop.py
#
# Tests: Suspend/Resume GUI Updates to ensure expression list updating in
# the GUI is being properly suspended and resumed.
#
# Mark C. Miller, Wed Dec 18 16:08:48 PST 2024
# ----------------------------------------------------------------------------
import time, os

def time_def_exprs(stem, n):
t1 = time.time()
for i in range(n):
DefineScalarExpression(stem % i, "d*%d" % i)
t2 = time.time()
return float(t2-t1)

def del_exprs(stem, n):
for i in range(n):
DeleteExpression(stem % i)

def main():
nexprs = 650
if os.uname().sysname.lower() == 'darwin':
nexprs = 200

OpenDatabase(silo_data_path("rect2d.silo"))
OpenGUI()
time.sleep(5)

#
# Check timing without suspending gui
#
t1 = time_def_exprs("var%04d", nexprs)
print(t1)
n1 = len(Expressions())
SuspendGUIUpdates()
del_exprs("var%04d", nexprs)

#
# Check timing WITH suspending gui
#
SuspendGUIUpdates()
t2 = time_def_exprs("var%04d", nexprs)
print(t2)
ResumeGUIUpdates()

#
# Ensure that expressions exist after the suspend/resume step
#
n2 = len(Expressions())

TestValueEQ("Expression count",n1,n2)
TestValueLE("Expression timing",t2,t1/5)

main()

Exit()
8 changes: 6 additions & 2 deletions src/visitpy/common/MethodDoc.C
Original file line number Diff line number Diff line change
Expand Up @@ -1843,7 +1843,9 @@ const char *visit_SuspendGUIUpdates_doc =
"\n"
"Returns:\n"
"\n"
" The SuspendGUIUpdates function returns 1 on success and 0 on failure.\n"
" The SuspendGUIUpdates function returns whatever the preceding state was.\n"
" If the preceding state was that GUI updates were suspended, it returns a 1.\n"
" Otherwise, it returns a 0.\n"
"\n"
"\n"
"Description:\n"
Expand Down Expand Up @@ -1874,7 +1876,9 @@ const char *visit_ResumeGUIUpdates_doc =
"\n"
"Returns:\n"
"\n"
" The ResumeGUIUpdates function returns 1 on success and 0 on failure.\n"
" The ResumeGUIUpdates function returns whatever the preceding state was.\n"
" If the preceding state was that GUI updates were suspended, it returns a 1.\n"
" Otherwise, it returns a 0.\n"
"\n"
"\n"
"Description:\n"
Expand Down
8 changes: 6 additions & 2 deletions src/visitpy/common/visitmodule.C
Original file line number Diff line number Diff line change
Expand Up @@ -3429,16 +3429,20 @@ ExpressionDefinitionHelper(PyObject *args, const char *name, Expression::ExprTyp

if (!strncmp(name, "SuspendGUIUpdates", 17) && t == Expression::Unknown)
{
bool suspendGUIUpdatesOld = suspendGUIUpdates;
NO_ARGUMENTS();
suspendGUIUpdates = true;
return IntReturnValue(Synchronize());
return PyInt_FromLong(long(suspendGUIUpdatesOld));
}
if (!strncmp(name, "ResumeGUIUpdates", 16) && t == Expression::Unknown)
{
bool suspendGUIUpdatesOld = suspendGUIUpdates;
NO_ARGUMENTS();
suspendGUIUpdates = false;
ExpressionList *list = GetViewerState()->GetExpressionList();
list->Notify();
GetViewerMethods()->ProcessExpressions();
return IntReturnValue(Synchronize());
return PyInt_FromLong(long(suspendGUIUpdatesOld));
}

char *exprName;
Expand Down

0 comments on commit 42da2b4

Please sign in to comment.