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
|
hi, just want to check our approach to something. we've got a scheduled task which fires up and does the following:
this process is holding too much memory while running - it must end up holding say, 10k large entities in memory. but i don't want to alter to a set-based sproc insert since there is business logic in the model that i want to use. I'm planning to alter this to something like:
this should keep the UOW much smaller, yes? cheers |
|
|
Yes, it should. Don't forget you can always get a count of pending inserts by writing: unitOfWork.Count(e => e.EntityState == EntityState.New); so you may not need to maintain a separate batch size. |
|
|
"don't forget"... thanks, didn't know that. cheers
|
|