Under a repeat control I would like to display a message how long it took to load the data-set for it e.g. "1000 documents loaded in 0.2 seconds".
How can I do this?
The number of elements in the list is easy via getRowCount(). But how can I get the time to collect the data?
You can put the start value in a scoped variable in the BeforePageLoad event and then access it after the page has loaded. You could use
System.nanoTime
for both values
Related
I have a sever side javascript from where I am calling Java Class to write the content to the file by reading a view entries.
I can show the loader in xpage front end that there is something happing behind. Now the java class iterates through the view entries, I wish to print the current status by showing the number of entries done in Java class, like 100 of 3000 entries are done and the done entry counts need to be updated dynamically in xpage frontend. To achieve this, I tried:
From the java class I save the counts of processed entries to a document in the database in the field entryCounter in the while loop and so on, then trying to access the same document field inside the xpage view, but here the count updates after completing the previous script call which is of Java Class Call, after the java class completes and the last server side script call ends the count gets updated, which is of no use, I want to show the real time counts while java class is processing the entries in the front ent to the user, because the server side event takes at least 5 min to complete the event process.
In between, server side event the other server side event don't gets fired to partial update the count component which I am trying get from the document saved by java class.
Is there any other way to dynamically update the count of processed view in java class?
In short I am trying dynamically update the count which is update in document from Java Class, but it is not getting updated if already a server side call is going, one that call completed the value for last count updates to the computed field.
IMHO you'd better use a different approach: a background agent, and some document known to both the agent and your XPage that contains the counter. A process that takes more than a few seconds should not be run in the foreground. Is that a feasible solution?
I need a table that shows about 2.5 million rows from an array that is already created in memory. When I create the table and add the array to the 'data' property, the browser engine runs out of memory after some (significant) time. I assume that tabulator not only creates objects for the current virtual DOM part, but for each entry in the array in advance.
So my question: is it possible to not provide the entire array, but only the the count of rows, and let tabulator ask for the content of each row via a callback only when needed for rendering. Of course it only makes sense if tabulator does not keep any data of rows that are gone out of view.
I know that this might be in conflict with some column calculation features or others, but this would be fine for my use case.
The same use case is working with canvas-datagrid, which I have tried before.
If you can use Ajax to get the data there is the Progressive Ajax Loading that will help you to load data using the pagination module to make a series of requests for part of the data set, one at a time, appending it to the table as the data arrives.
Doc is here: http://tabulator.info/docs/4.3/data#ajax-alter
Progressive loading is an option, but you still are going to run into the issue that you will have two copies of the data in memory. It will either happen automatically if in 'load' mode or manually in 'scroll' mode as you scroll through the table. The best option would seem to be to have code via say a button that loads the data using either setData() or replaceData(). Then the user could fetch either the next or previous set of data in batches.
I have a lot of fields on a form. Not exactly sure how many but it has to be close to 100, if not over.
I have a change event of one field doing a partial refresh of a computed field with the following formula.
return document1.getItemValueString("txtCustomScore");
txtCustomScore is the field that has the event.
It takes 3-4 seconds to update this field. Are all of those other field somehow affecting how long it takes to refresh this field? It is taking 3-4 seconds.
I even tried getValue instead of getItemValueString. As suggested in this thread:
Setting a document field with replaceItemValue from a rich text control?
But it still takes 3-4 seconds to update the computed field.
Is there anyway to fix this other than eliminating fields from the form?
Yes it does. Even for a partial refresh all component values get evaluated and the server side result tree is built. As Tommy suggested, partial execution mode might be your answer
I strongly encourage you to watch the XPages Masterclass Video Series 1 (See: http://tonymcguckin.wordpress.com/2013/04/22/xpages-masterclass-series-1/).
From this you will then be able to introspect the XPages Request Processing Lifecycle phases and Profile your application. This will uncover the exact reasons behind the processing cost.
I have a simulation set to run for 30 seconds, with several scopes. The problem is that the output for the first 20 seconds of the run is dropped by the scopes at the end of the simulation run.
If I want to see these outputs, I would have to change the 'stop time' in configuration parameters to 20 seconds. My 'start time' is always set at 0.0 seconds.
Is there any place where I can change the buffer setting or something?
By default, the scope block will only display the last 5000 data points. As described in the doc for the scope block, you can adjust this setting by navigating to the History tab of the scope's parameters dialog box. There you will see the setting Limit data points to last. You can either increase the number of data points that are displayed, or simply uncheck this setting to allow all data points to be displayed. Because you are running your simulation over such a short span of time, it's probably perfectly fine to just uncheck this setting on each of your scopes.
If you add grouping to a list view does it inheretly improve performance when you navigate to the view in the sharepoint page? i.e. if you use grouping, does sharepoint retrieve data when you click the [+] icon (using an Ajax call)? or is the data already retrieved beforehand?
Many thanks.
when u use grouping by default all your group document are not loaded first time. when u expand group it load all document.
After that using JavaScript it change the property from display none to display block and display block to display none and so on.
so according to performance it load all document first time but it's quick.
This is same for list also
My experience is that using groupings loads all data at once. So if you have a list with 1000 items and you display a grouped view, you may experience very slow loading.