<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
p.xmsonormal, li.xmsonormal, div.xmsonormal
        {mso-style-name:x_msonormal;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.oneclick-link
        {mso-style-name:oneclick-link;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FR-CA" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt;color:black"> <o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt;color:black">Hi all,
<o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt;color:black"> <o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt">VTK pipelines are great, they allow to dynamically create a flow of algorithms. However, we recently encountered a massive lag in our pipeline related to the pipeline mechanisms (as opposed to
 the algorithms’ calculation time).  We are using a derivative of ParaView with homemade filters.
<o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt">We profiled our application in such a way that the profiling session started when all of the algorithms present in the pipeline had already been executed once and were up to date. The profiler
 pointed out two methods that were called a very significant amount of times while no updates were required on any of the algorithms of the pipeline. Those methods were:<o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="font-size:12.0pt">1) vtkInformation::GetAsObjectBase(...)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="font-size:12.0pt">2) vtkDemandDrivenPipeline::ComputePipelineMTime(...)<o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt;color:black">This lag doesn’t appear when only filters at the beginning of the pipeline are shown, but as we go down in the pipeline and show the outputs of filters, the lag become unbearable:<o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt;color:black">We think this lag is caused by the number of inputs our filters have combined with the length and complexity of the pipeline. In the following, I will explain our line of thought
 and propose a way to solve our pipeline scalability problem. <o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="xmsonormal"><b><span lang="EN-CA" style="font-size:12.0pt;color:black">Demand Driven Pipelines for Representation:</span></b><span lang="EN-CA" style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt;color:black">Our understanding is that a representation pipeline usually involves that the multiplicity of outputs<b> is greater than</b> the multiplicity of inputs. The pipeline fans out.  This
 mean that the Update() process is rather fast and scalable. <o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt;color:black"> <o:p></o:p></span></p>
<p class="xmsonormal" align="center" style="text-align:center"><span style="font-size:12.0pt;color:black"><img width="240" height="194" style="width:2.5in;height:2.0208in" id="x_Picture_x0020_1" src="cid:image001.jpg@01D3B474.DFE725B0"></span><span lang="EN-CA" style="font-size:12.0pt;color:black"><br>
</span><span lang="EN-CA" style="font-size:7.0pt;color:black">In the previous picture, if filter 3 needs an Update(), only filter 0,1 and 3 will have a RequestData().</span><span lang="EN-CA" style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
<p class="xmsonormal" align="center" style="text-align:center"><span lang="EN-CA" style="font-size:7.0pt;color:black"> </span><span lang="EN-CA" style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
<p class="xmsonormal"><b><span lang="EN-CA" style="font-size:12.0pt;color:black">Demand Driven Pipeline for Modeling:</span></b><span lang="EN-CA" style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
<p class="xmsonormal" style="margin-bottom:12.0pt"><span lang="EN-CA" style="font-size:12.0pt;color:black">However, in our case, we use VTK as a visualisation library as well as a mesh processing tool. To process mesh, you often need multiple inputs (boolean
 operations, points projections on a mesh</span><span lang="EN-CA" style="font-size:12.0pt;font-family:"Times New Roman",serif;color:black">…</span><span lang="EN-CA" style="font-size:12.0pt;color:black">): the multiplicity of inputs is
<b>equivalent </b>to the multiplicity of outputs.<o:p></o:p></span></p>
<p class="xmsonormal" align="center" style="text-align:center"><span lang="EN-CA" style="font-size:12.0pt;color:black"><img width="278" height="336" style="width:2.8958in;height:3.5in" id="x_Picture_x0020_7" src="cid:image002.jpg@01D3B474.DFE725B0"></span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
<p class="xmsonormal" align="center" style="margin-bottom:12.0pt;text-align:center">
<span lang="EN-CA" style="font-size:7.0pt;color:black">If filter 8 needs an Update(), all filters Upstream will require to Update() except (6,3,1)</span><span lang="EN-CA" style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt;color:black">With high input multiplicity, the Update() process, even with a distributed executive pipeline, will impact performance, creating a significant overhead.
<o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt;color:black"> <o:p></o:p></span></p>
<p class="xmsonormal"><b><span lang="EN-CA" style="font-size:12.0pt;color:black">Demand Driven Pipeline with Event Driven Subsets:</span></b><span lang="EN-CA" style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt;color:black">Here we suggest an improvement over the DemandDrivenPipeline by introducing Event Driven (push) subsets:<o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt;color:black"> <o:p></o:p></span></p>
<p class="xmsonormal" align="center" style="text-align:center"><span lang="EN-CA" style="font-size:12.0pt;color:black"><img width="353" height="342" style="width:3.677in;height:3.5625in" id="_x0000_i1034" src="cid:image003.jpg@01D3B474.DFE725B0"><br>
</span><span lang="EN-CA" style="font-size:7.0pt;color:black">If Filter 8 needs an Update(), the signal will be passed to the subset and then to Filter0. Filter 2,4,5 and 7 are force to calculate in a Event-driven fashion.</span><span lang="EN-CA" style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
<p class="xmsonormal" align="center" style="text-align:center"><span lang="EN-CA" style="font-size:12.0pt;color:black"> <o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt;color:black">The overhead of the representation pipeline Update() when you have a high input multiplicity could be reduced with the creation of subsets of a pipeline. The subsets should be handled
 as Event Triggered Pipelines (Push Pipelines). <br>
<br>
A push subset could be considered like a filter that contains a small part of the pipeline and where all outputs execute a RequestData() using a Push Pipeline.<o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt;color:black"> <o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt;color:black">We are aware of the vtkThreadedStreamingPipeline that had PUSH/PULL capability, however it is now legacy. Also, we do not require the threaded/scheduler capability of this pipeline
 model.  An extended version of the vtkDemandDrivenPipeline with a Event Driven (pull) pipeline that would apply to a subset would be ideal.
<o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt;color:black"> <o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-CA" style="font-size:12.0pt;color:black">Please share your thoughts  on creating such a pipeline. Please keep in mind that this suggestion has the goal to keep the pipeline’s dynamism, we are aware that we could package
 the subset into a single filter. <br>
<br>
Thank you,<br>
<br>
Jonathan Borduas<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA"><o:p> </o:p></span></p>
</div>
</body>
</html>