Skip to main content
Question

Performance - Just how expensive is RequestRefresh() during a Grid control?

  • Nov 27, 2026 3:33 AM UTC
  • 0 replies
  • 5 views
  • Translate All

willhowardnz
Freshman I
Forum|alt.badge.img

Hi all,

Trying to pick brains/confirm my understanding. (I haven’t done benchmarking on this).

I’ve been reading through code examples.


There’s a note in T210 that

You will use the PXView.RequestRefresh() method. To optimize the performance, by default, in the RowUpdated event, the system synchronizes the values in the UI with the data in PXCache for only the current record. Because you have updated the values in other detail records, you need to refresh the UI by using the PXView.RequestRefresh() method.


The code example then given will call RequestRefresh even if no other rows are updated by the RowUpdated event:

Example code from T210 for 26R1 , Page 52


When I was doing a lot of SQL development I know that minimizing empty result sets calling to other triggers can have a big impact.  

Does anyone with more experience know how bad the impacts of overly hitting RequestRefresh are though?

Suppositions/Questions:

  1. How big is the impact of calling a RequestRefresh() during a RowUpdated event in data grid?
  2. Given the instruction to keep RequestRefresh to a minimum to preserve performance, 
    Am I right that it’s important the RequestRefresh() event never be called inside of the ForEach
    RequestRefresh() inside of ForEach, presumably bad because it can be called repeatedly during the RowUpdated event
  3. Would it be best practice to detect for the screen actually having gone stale, or is the cost of checking that likely to outweigh the potential benefits or not calling for redraws of the grid control?
    Modified example code to add screenStale variable and only RequestRefresh if a redraw is required.