Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting total View entries including categories - performance issue
    primarykey
    data
    text
    <p>I'm using a custom footer on my View Control; there I have for example:</p> <blockquote> <p>Displaying <strong>1</strong> - <strong>25</strong> of <strong>34200</strong></p> </blockquote> <p>My underlying View is Categorized so the total of entries should include categories as well. So far the only way I'm able to find the total of entries including categories is using NotesViewNavigator; however, performance is not acceptable since it's taking around 27 seconds to compute this piece of code.</p> <p>I'm sure the issue is with line <code>var nav:NotesViewNavigator = view1.createViewNav();</code> because I added some debugger info:</p> <pre><code>start = new Date().getTime(); var viewPanel1:com.ibm.xsp.component.xp.XspViewPanel = getComponent("dataView1"); var nav:NotesViewNavigator = view1.createViewNav(); if (viewScope.VendorSrch == "" || viewScope.VendorSrch == null){ var total = nav.getCount(); }else{ var total = viewPanel1.getRowCount();// View can be filtered by user as well (using categoryFilter property) } var from =(viewPanel1.getFirst() &lt; total? (viewPanel1.getFirst() + 1 ) : total); var tmpTo = viewPanel1.getFirst() + viewPanel1.getRows(); var to = (tmpTo &lt; total? tmpTo : total); var elapsed = new Date().getTime() - start; print(elapsed + " ms"); "&lt;/b&gt;Displaying &lt;b&gt;"+ from +"&lt;/b&gt; - &lt;b&gt;"+ to + "&lt;/b&gt; of " + "&lt;b&gt;"+total+"&lt;/b&gt;" </code></pre> <p>Does anyone know how can I improve this piece of code?</p> <p>Please note documents in this View have Readers fields as well which may be impacting the performance of this operation.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload