I'd like to know if it's necessary to compile linq queries to the subsonic entities?
For example would I'd need to compile the following linq query?
var comments = from a in All()
where a.ParentCommentId == ArticleCommentId
select a;
From stackoverflow
-
Compiled queries are an optional optimization that allow you avoid parsing an expression tree multiple times. It's never required, but may be necessary to meet your performance requirements.
romkyns : I should mention that the cost can be quite significant unexpectedly. Any place where a query is invoked in a loop may need either refactoring or compiling the queries in the loop. Otherwise a tiny innocent-looking query invoked a mere 10 times may suddenly give you a 0.5 second delay in the user interface.
0 comments:
Post a Comment