1. Stephan Schröpel
  2. PowerBuilder
  3. Thursday, 29 August 2024 15:41 PM UTC

Hey Powerbuilders and DataWindow-Designers!

I "designed" a datawindow and it looks very good. It has many PNG pictures to show informations in a graphical manner.

So far so good. But when I want to retrieve a larger amount of data, ist is getting awfully slow when I retrieve data for the first time in this screen.

Choosing an other datawindow and coming back its fast enough. It is not a problem of the retrieve, which is fast in any case. 

 

I think, first time a chache is filled, also it depends from the PCs RAM. On a virtual machine with 4 GB memory you like kill the task.

 

Any tips to improve this behaviour?

 

Thanks for all tips!

Stephan

 

Sivaprakash BKR Accepted Answer Pending Moderation
  1. Friday, 30 August 2024 10:54 AM UTC
  2. PowerBuilder
  3. # 1

Stephen,

Can you find out the time the SQL statement takes to retrieve the same data?  Try running the query in the SQL Management Studio (if SQL Server or equivalent if other database) and find out whether the query takes the same amount of time, if run for the first time.

It is better to have SetRedraw(False) before retrieve of dw with large result set ( as suggested by David Peace )

If the query takes more time on cold start, then try retrieving the data on a separate thread before opening of this particular screen.  [ I'm not an expert in using thread ].  

Hapiness Always
BKR Sivaprakash

 

 

Comment
  1. Stephan Schröpel
  2. Monday, 2 September 2024 10:53 AM UTC
Hell Sivaprakash, thank you for your answer,

I ran the pure SQL-Statement before iSQL of SQL Anywhere and ist was pretty fast in parts of a second. In Powerbuilder the same query is about 25 seconds at the first time. Retrieving other data and coming back, it is now quick as expected, not even a second.

I tried to increase cache settings of the database from 2G to 4 G maximum, but no difference.



Setting Redraw to false, makes a litte difference, about 5 seconds.



best regards

Stephan



  1. Helpful
  1. Sivaprakash BKR
  2. Monday, 2 September 2024 12:14 PM UTC
Stephen,

1. The time taken to run the query in iSQL and in DW [ PB IDE] should be almost same.

2. Check the same in the script, by adding required messagebox(es) before and after dw_1.Retrieve().



If the all the three times are same, then check other parts of the scripts that delays the result display.



If the issue is for the first time (after cold start), I too face similar issue, which my customers are accustomed to it, now.

  1. Helpful
There are no comments made yet.
David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Thursday, 29 August 2024 15:52 PM UTC
  2. PowerBuilder
  3. # 2

Hi Stephan

You could try setting the Setredraw(False) just before the retrieve and then back to True afterwards. That will reduce the rendering is PB is trying to renderer as each row is received.

Just an idea.

David

Comment
  1. Stephan Schröpel
  2. Monday, 2 September 2024 10:53 AM UTC
Hi David,

Like mentioned before, it's a little bit faster, setting Redraw to false.

I just found an old version of my software, the screen is nearly the same. Rerieving the same set of data on the same database, the result was there in less than a second. It was build with PB 19, without any themes.

So I switched off any themes, but it was slow as before.

Now I renamed the datawindow and imported the same datawindow from the old version .... and it was fast again!

I will examine and searching for the difference now.



best regards

Stephan





  1. Helpful 2
  1. David Peace (Powersoft)
  2. Monday, 2 September 2024 11:23 AM UTC
Sounds like you are onto something now, I'd be very interested to know the difference too.
  1. Helpful 2
  1. Eduardo G.
  2. Wednesday, 4 September 2024 06:17 AM UTC
I am very interested in knowing these differences, I also have slowness problems with the change to the latest PB build and maybe your answer will give me a clue to find a solution to what is happening to me.
  1. Helpful 2
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.