1. David Vasconcelos
  2. PowerServer 2020 or older (Obsolete)
  3. Wednesday, 5 June 2019 10:53 AM UTC

Powerserver 2017  (using PB2017 R3 environment, Sybase 16 ASE database)

Internet Explorer 11.

Slow performance on a datawindow.

Scenario.

Window that contains 1 Visible Datawindow

Datawindow is External Free Form 253 columns.  There are expressions on the Visible and Y attributes of all columns.

 

Process...

Working with 2 local datastores.

Step 1:  Datastore 1 retrieves 31,700 rows.  

Step 2: Datastore 2 uses the same dataobject as the above external datawindow.  A loop is used to go through all the rows in datastore 1 and using setitem populates datastore 2. 

Step 3: Once the loop has completed then A rowscopy is used to copy all the rows from datastore 2 to the datawindow, this whole process only takes about 30 seconds.  Note, setredraw was off on the datawindow when this process started.

Step 4:  Once the rowscopy completes then setredraw is turned back on... this one command takes over two minutes before I get control back on the window.

 

Other note.  I had added a messagebox after the setredraw(TRUE), when this messagebox pops up I can't interact with it.  Seems like the setredraw is still running and preventing me from interacting with the messagebox.  Once the screen has completed painting then the messagebox is active. 

Any ideas on how to speed up the redraw?  (Note: can't change the datawindow)

 

 

David Vasconcelos Accepted Answer Pending Moderation
  1. Saturday, 8 June 2019 09:43 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

Chris and company.. The rows retrieval and setting up the data is fine it only takes about 30 to 40 seconds and that is acceptable. Its when setredraw is turned back on is where it slows down. Because this is a "display" function I don't see how sharedata or .net solution would come into play. No matter how I get the data it still needs to be displayed in the browser and that is where it slows down. Unfortunately rowscopy was a necessary evil due to some coding. I don't understand why the setredraw function would cause a 2 1/2 to 3 minute delay just to paint the screen the data has already been retrieved, loaded and formatted only needs to be presented/displayed to the user. So if anyone has any other ideas?

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 5 June 2019 18:33 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 2

Hi David;

  Suggestions:

Step #2 ... Only populate DS#2 with the related data when the user scrolls the DC's rows into its viewing area.

Step #3 ... use a ShareData () between the DS and the DC - not a RowsCopy()!  (OMG ... ouch)

HTH

Regards ... Chris

 

 

Comment
  1. David Vasconcelos
  2. Thursday, 6 June 2019 16:34 PM UTC
Chris and company.. The rows retrieval and setting up the data is fine it only takes about 30 to 40 seconds and that is acceptable. Its when setredraw is turned back on is where it slows down. Because this is a "display" function I don't see how sharedata or .net solution would come into play. No matter how I get the data it still needs to be displayed in the browser and that is where it slows down. Unfortunately rowscopy was a necessary evil due to some coding. I don't understand why the setredraw function would cause a 2 1/2 to 3 minute delay just to paint the screen the data has already been retrieved, loaded and formatted only needs to be presented/displayed to the user. So if anyone has any other ideas?
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 5 June 2019 17:56 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 3

I agree with Mike, unless you really have a strong business reason to display all 31,700 rows in the web browser in one shot.  Just to clarify about Mike's suggestion, you would upgrade to PowerBuilder 2019 and PowerServer 2019, create a C# Web API using the new .NET DataStore to handle this on the server-side, and then pass back the data you want to display in the browser (in JSON format).  PowerServer 2019 (just like PowerBuilder 2019) has the new HTTPClient object and JSON capabilities.

Comment
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Wednesday, 5 June 2019 11:32 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 4

to be clear, you are displaying all 31,700 rows in the datawindow?     are you doing a groupcalc?

I have found that powerserver datawindows, especially with groupcalc, runs very slowly over about 10,000 rows or so. datawindow processing gets slower as you have more rows (rows per second rate goes way down).  I have an open ticket in the old ticketing system: ticket #3370       PB is much much faster.

 

I suggest that you consider changing the processing to a service.  If this is a report or if you are making it available as a download, then do it on a server and return the results (pdf, excel, whatever) as a download.  

 

 

 

 

 

 

 

Comment
  1. David Vasconcelos
  2. Wednesday, 5 June 2019 12:03 PM UTC
Only about 20 rows are actually visible at a time, to view the rest the user would need to scroll, but all 31,700 rows are loaded. There is no groupcalc. This is an old dw that is used to simulate a treeview (before treeview object/dw was added to PB). It works and has no issues and yes it needs to be re-written, just can't be done at this time. Thanks.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.