RowState of DataTable

Posts   
 
    
DvK
User
Posts: 318
Joined: 22-Mar-2006
# Posted on: 03-Apr-2019 09:35:29   

Hi,

Using the latest version of v5.5.2 (March 7).

We migrated from 5.2 to 5.5 recently and now we're facing a breaking change regarding fetching typedlists. In 5.2 the default RowState was set to _'unchanged' _after fetching, now the default RowState is set to _'added' _apparently.

We have built-in logic throughout the whole application that does decision-handling based on the RowState of records. Does this sound familiar ? Any solution for this ?

greetz, Danny

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 04-Apr-2019 03:08:10   

We are looking into it.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 04-Apr-2019 10:13:30   

It's a breaking change indeed, but one which we didn't anticipate, as a typedlist is used in a readonly fashion (as it's not an element which is to be edited).

The main issue is that to fix it, we have to call AcceptChanges, which causes a 5-6% performance loss and allocates 2-3% more memory. The change was mainly the result of bringing down the allocations and the time taken to fetch rows.

That said, the datatable based typedlist/views are legacy anyway and people shouldn't be using them in new projects so it's not that much of a big deal if we add that 5-6% performance back, as overall the fetch is quite slow compared to the queryspec/linq using poco approach:


Handcoded materializer using DbDataReader                    : 119,12ms (3,39ms)       Enum: 0,94ms (0,01ms)
LLBLGen Pro v5.5.0.0 (v5.5.2), Poco typed view with QuerySpec : 140,99ms (0,53ms)      Enum: 1,68ms (0,20ms)
LLBLGen Pro v5.5.0.0 (v5.5.2), DataTable based TypedView      : 201,24ms (5,08ms)      Enum: 3,17ms (0,06ms)

Memory usage, per iteration
------------------------------------------------------------------------------
Handcoded materializer using DbDataReader                    : 15.170 KB (15.534.768 bytes)
LLBLGen Pro v5.5.0.0 (v5.5.2), Poco typed view with QuerySpec : 31.826 KB (32.590.512 bytes)
LLBLGen Pro v5.5.0.0 (v5.5.2), DataTable based TypedView      : 55.324 KB (56.652.416 bytes)

(31000 rows)

With calling AcceptChanges the datatable based typedview (using the same pipeline as typedlists) takes ~207ms and allocates 56.5MB memory

We'll fix it in the next hotfix build.

Frans Bouma | Lead developer LLBLGen Pro
DvK
User
Posts: 318
Joined: 22-Mar-2006
# Posted on: 04-Apr-2019 10:35:12   

Hi Frans,

Thanks for the feedback. Yes, it's old(er) code indeed, but our 'legacy' application is using typedlists a lot so this breaking change is causing quite some issues right now. We were already thinking about downgrading rage

Any idea about the timing of the hotfix ?

Greetz, Danny

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 04-Apr-2019 10:36:02   

Hotfix build for 5.5.3 is now available with the fix for this issue.

Frans Bouma | Lead developer LLBLGen Pro
DvK
User
Posts: 318
Joined: 22-Mar-2006
# Posted on: 04-Apr-2019 10:37:55   

THANK YOU ! That's faster than fast...

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 04-Apr-2019 11:01:43   

The fix was literally changing false into true sunglasses

Frans Bouma | Lead developer LLBLGen Pro