1. mike S
  2. PowerServer 2020 or older (Obsolete)
  3. Saturday, 23 February 2019 17:09 PM UTC

We are looking to improve performance in PS web, and we use querymode for searching.  And, in order to get around all of the limitations of querymode, we use sqlpreview to add missing functionality to the querymode processing.

 

These tidbits for sqlpreview are listed in the powerserver docs:

  1. Each time the DataWindow SQLPreview event is triggered, the mobile/web application will interact with PowerServer twice, which costs 1-2 seconds. Therefore, Appeon recommends you minimize writing script into the SQLPreview event of the DataWindow.
  2. ...sqlpreview event will generate one call for each line of code handled by the event.

 

Which of these are true? The first one says TWICE at 1-2 seconds, the other says 1 per line of code.  These can't both be true.

Does a comment count as a line of code?  

If i only have a comment in sqlpreview, does the event still get triggered?

Does a call to a method on an object count as a single line of code, or does each line of code in the method count?

Are those statements equally true for datastores as they are for datawindows?  

Is that 1-2 seconds still an accurate estimate?  

 

 

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 25 February 2019 17:45 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

Hi Mike;

  Yes like the RetrieveRow event, even a comment in these events will force control over to your App when these conditions are activated. I have not traced the double interaction personally on the SQLPreview and my framework uses a lot of code here. Yet, I do not see any degradation. I wonder though if its because my network latency on my systems is very low. You might encounter or visibly see a different lag in App performance if your network latency is very high.

  I will "ping" the Engineering team on this aspect and report back here as soon as I have more information. Thank you for that thought provocating question!

Regards ... Chris

Comment
  1. mike S
  2. Monday, 25 February 2019 22:40 PM UTC
yeah, i don't see any real slowness - and i am running the testing on a VM hosted on Azure on a VERY underpowered vm.



also, i assume you meant sqlpreview and not retrieverow in your first sentence
  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.