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
|
In Lightspeed 3.0, there's an apparent performance problem in how the engine materializes new objects. The following code, when executed, returns around 4000 entities/records: var accounts = (from account in unitOfWork.Accounts The SQL query runs in under 1 second, and the called code returns within 2 seconds.
... but add a join clause: var accounts = (from account in unitOfWork.Accounts and the SQL query still runs in under a second, but it takes Lightspeed over a minute to materialize the entities. Since the LINQ stipulates that only the account object needs to be materialized, this is definately a problem. Moreover, lmit the above LINQ with ".Take(300)" and suddenly the performance is better, which suggests an exponential degredation of peformance. Can you guys please help me resolve this ASAP - it's a deal breaker for my project! PS:- Context is running on default settings with no cache. |
|
|
Hi Mark, Thank you for reporting this. Could you please let me know if you are using composite keys in any tables and if you're using the latest nightly? There was an issue reported about a week ago which resolved that caused entities with composite keys to take an age to materialise (relating to how .NET generates hash codes for struct objects). If you're using composite keys then the latest nightly build should help. If you're not using composite keys then could you please email me a small repro and I will investigate this further. You can email it to support@mindscape.co.nz so that it remains confidential if the project is sensitive. I hope this helps, John-Daniel Trask |
|