What is the fastest/most efficient way of refreshing an OLV?
SetObjects receives an SQLAlchemy.query object which contains zero or more instances of class Vcbook (a table, actually a Firebird SQL view).
When I make a change to one of the Vcbook instances I then call myOlv.RepopulateList but this seems to be slow.
The problem is probably not with OLV, but I wanted to check if this would be the right approach or would it be better to use RefreshObject and hand it a new Vcbook instance (of only the one which was changed). How would OLV figure out that this is a changed instance of one it already received in the SetObjects call?)
FYI, In the past I used a virtual list for this and just pulled in the changed Vcbook data into the datacache, this was faster, i.e. I did not see a delay when clicking on the 'save' button.
I suspect that SQLAlchemy is doing a new query, as the save/commit would flag objects in memory as 'dirty' (but I am just guessing at the moment).
Appreciate any hints.
Werner
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What is the fastest/most efficient way of refreshing an OLV?
SetObjects receives an SQLAlchemy.query object which contains zero or more instances of class Vcbook (a table, actually a Firebird SQL view).
When I make a change to one of the Vcbook instances I then call myOlv.RepopulateList but this seems to be slow.
The problem is probably not with OLV, but I wanted to check if this would be the right approach or would it be better to use RefreshObject and hand it a new Vcbook instance (of only the one which was changed). How would OLV figure out that this is a changed instance of one it already received in the SetObjects call?)
FYI, In the past I used a virtual list for this and just pulled in the changed Vcbook data into the datacache, this was faster, i.e. I did not see a delay when clicking on the 'save' button.
I suspect that SQLAlchemy is doing a new query, as the save/commit would flag objects in memory as 'dirty' (but I am just guessing at the moment).
Appreciate any hints.
Werner
Was not quit a awake when I wrote this.
Problem solved using RefreshObjects(alist of Vbook instances)
Sorry for the noise
Werner