This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
What impact does the UseMediumTrustCompatibility have in 3.0?
|
|
|
Yes, the implementation and effects of the medium trust setting are the same in 3.0 as in 2.0. The effect of LightSpeedContext.UseMediumTrustCompatibility is that we use plain old reflection to create entity objects and set and get fields when materialising or saving entities. This is slower than our full-trust approach of dynamically generating getter and setter methods (which is not allowed in medium trust). In addition, there is a medium trust setting in the designer. The effect of this is to generate the special fields for Track Create Time, Track Update Time, Optimistic Concurrency Checking and Soft Delete as read-write rather than read-only. This does not affect speed but could affect safety because it makes it possible for entity code to modify those fields. |
|
|
next question is how much slower? i realise it likely depends on the scenario, but are we talking fractionally slower or multiples? thinking about the ormbattle tests what particular tests would you expect to see it performing slower? CRUD, Querying, Linq or over all slower? thanks.
|
|
|
Overall slower. There would be no additional overhead within the querying or LINQ subsystems themselves, but the slower materialisation (because of reflection-based instantiation and field setting) would affect all load operations, and the slower retrieval of entity data (because of reflection-based field getting) would affect all save operations. We have not performed tests to compare medium and full trust implementations. I suspect that the effect would be fractional because the additional cost of reflection is dwarfed by the cost of the network round-trip, but I don't have figures to back this up. |
|
|
ok thanks ivan |
|