|
| Iniciado por guest, 23,feb. 2015 15:13 - 6 respuestas |
| |
| | | |
|
| |
| Publicado el 23,febrero 2015 - 15:13 |
Hi
I wonder if somebody can advise on the best way to utilise loopers within Webdev.
Currently I get my data by means of a query and thenadd the data to a looper from the query by means of LooperAddLine.
The problems I have with this approach:
When there is 350 + records it takes some time to display the looper. Where the user makes changes to the data in the looper I want to update the underlying table immediately. I don't want the user to update 100 records and then he/she looses an internet connection or forgets to click an update button.
Even if I use a looper directly linked to a query the speed to load 350 + records is slow. Then to update the records as the changes are made takes as long as the above approach.
I have also linked the looper to a variable but the initial populating of the variable and display of the looper takes the same time as looperaddline.
I don't use the loopers with pagers as it's irritating to go page next, next, next if you don't know where the record is you are looking for and there are 40-50 pages. It's much faster to just scroll down a looper if it is sorted.
I have tried changing from Classic to Ajax loopers but don't really see a difference in speed unless I'm not handling the looper code correctly.
With a new client I have cases where 500 + records must be displayed and the performance is terrible.
Any suggestions, as always, are much appreciated.
Ericus Steyn |
| |
| |
| | | |
|
| | |
| |
| Publicado el 23,febrero 2015 - 15:43 |
Hi Ericus
the first thing to consider is that all you are describing is a perfectly normal behavior... For 350 records, the system has to read all of them, then create the corresponding html page and display them... And that takes them, if only in the transmission from server to browser
So in order to improve the VISIBLE speed, you ill have to do quite a bit of work and create a DYNAMICALLY FILLED looper :
For that :
1. you need to use a browser side looper 2. you create a query that returns ONLY the unique identifier of each record, in the desired order, and you give that as a parameter (string) to the page 3. You open your page with the lopper empty 4. you then used Ajaxexecute (synchronous or not) to fill a few lines of the looper, either on a timer OR when the user clicks on the scrollbar
A good example of the result is in linkedin website, when they propose new contacts to you... it is basically infinite, and is filled little by little only
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 23,febrero 2015 - 16:48 |
Thanks Fabrice
I will give it a try.
Ericus Steyn |
| |
| |
| | | |
|
| | |
| |
| Publicado el 23,febrero 2015 - 19:38 |
Hi,
A little trick that works in WinDev (and maybe also in WebDev) is to make the looper invisible when filling and only show it after completion.
While looper..visible=false WinDev (and perhaps also WebDev) does not need to take care of any visual updating of the screen, so, then it is only the speed of datatransmission.
Again, in WinDev you even do not notice a 'flicker' when switching between visible and invisible.
By the way, that is also the case with tables.
Just worth to try?
Kind regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,febrero 2015 - 01:49 |
Hi Rudolf
that won't work in webdev... the preparation is done on the server, then the whole page is sent to the browser and then the display is done over there all at once
Best regards
-- Fabrice Harari International WinDev, WebDev and WinDev mobile Consulting
NEW: WXReplication, your open source replication system is available on my web site!!! WXShowroom.com: Show your projects! More information on http://www.fabriceharari.com
On 2/23/2015 1:38 PM, Rudolf van Roosmalen wrote:
Hi,
A little trick that works in WinDev (and maybe also in WebDev) is to make the looper invisible when filling and only show it after completion.
While looper..visible=false WinDev (and perhaps also WebDev) does not need to take care of any visual updating of the screen, so, then it is only the speed of datatransmission.
Again, in WinDev you even do not notice a 'flicker' when switching between visible and invisible.
By the way, that is also the case with tables.
Just worth to try?
Kind regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,febrero 2015 - 09:39 |
Hi Ericus,
Using a looper to show all data from all records is wasting resources. A user can only look at and modify one dataset at a time. So why don't you take the table + form approach? Choose some fields to show in the table and show the rest of the data on selection of a row.
Regards, Piet |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,febrero 2015 - 19:56 |
Hi Piet
Yes the looper with all this data is a waste but I am really using this to handle cashbooks.
The customer's bank statement is imported and than can be 350 + lines. I must be sure the customer complete all the payments and receipts on the one statement before downloading another statement.
Now there might be an amount of xxxxx.xx on the statement from one debtor and that amount must be matched against outstanding invoices. The number of possible invoices to match against for that one debtor might be in the 100's. Now to load the statement bit by bit, as well as the invoices to match against bit by bit can be more error prone and maybe even slower than it is now.
However my users only see the slow speed now and don't realise that it is actually still faster than capturing the complete cashbook line by line.
Regards
Ericus Steyn |
| |
| |
| | | |
|
| | | | |
| | |
|