Hi,
1) There is slight misunderstanding about this question. I had run some basic performance tests. If you load 140000 records of objects as a big list, at once, using Manager.Find<TCustomer>.AddOrder(Torder.Asc('CustomerID')).Take(160000).List it will take 5min:12 sec. Loading same amount, however, using
For i:=0 to 159 do
Manager.Find<TTimesheet>.AddOrder(Torder.Asc('CustomerID')).Skip(1000*i).Take(1000).List;
will take only 1min:48 seconds.
I can safely add Mylist.AddRange in both cases without noticeable changes in performance. So there should be some kind of a problem with memory allocation, that will significantly slow loading big lists of objects at once. IF you go to 500000 fairly complex objects, difference in loading times between those two methods will be more then 6 times!
2) Thank you, it really helped!
3) Is not about saving few bytes, its again, about the performance. The similar feature is in the Entity Framework, when you can map service layer objects to database entity, reading only specific properties. And if you mapped your service layer to 2 properties out of 12, it will only select those 2 needed properties.
Again, I did some basic performance testing using Dynamic Properties.
I checked int, datetime, guid, nvarchar(50), int fields loading. Normally on 40.000 records each additional field gives 500ms-1000ms loading time. Loading 40.000 objects that consists of 10 guids instead of 1 more than twice times slower (11216ms vs 4711ms). Consider having CreatedAt,CreatedBy(uid),ModifiedAt, ModifiedBY(UID),DeletedAt, DeletedBy(UID) fields, that in most cases should not be loaded at all. Or, consider populating some list with only selected object properties... Why should we waste time and resources on loading the data that we don't really need?
And it should not return Null, it should just return exception if you try to access property that wasn't supposed to be loaded because of your mapping setup.
4) Thank you, it worked! Is there any way to map Aurelius Objects to Stored procedures and/or Functions? I noticed that you have Dataset that can be mapped to any ObjectList. Is there any way to map existing ObjectList TO dataset? Basically fill the dataset with properfields and types, and then get Aurelius to try and fetch the objects from this list?
If we had this functionality it would be easy to get objects from any database objects, even from functions and procedures.
5) When i tried to create simple test object with ID that should be generated by Aurelius and not mapped to database I always get an error 'Invalid member FUID defined in ID attribute'.
[Table('AureliusTest')]
[id('FUID',TidGenerator.Uuid38)]
private
FUID: string;
FProps: TDynamicProperties;
6)I have test class:
[Table('AureliusTest')]
[Id('Fint', TIdGenerator.IdentityOrSequence)]:
TAUTestD = class
private
TUID: Nullable<TGuid>;
[Column('int', [])]
Fint: Nullable<integer>;
FProps: TDynamicProperties;
If I comment out TUID and try to create dynamic property of Nullable<TGuid> I would get an error that this type is not declared in interface section. However, with uncommented TUID, i could easily create dynamic properties, without any further changes to the code.
Thank you for your support.