In my experience there are two main phases where LINQPad might spend significant time when executing your query:
- while executing the query against the data context and gathering the data
- while retrieving and converting the data into the HTML format for display
While LINQPad is executing your query (phase 1 above), you can cancel the query with Shift-F5.
While LINQPad is building the HTML to display, I unfortunately haven't found a way to cancel the query. What I normally do is either kill LINQPad (through task manager or other means) completely (since it saves queries automatically, you normally don't lose any work) or just let the query run its course. Then I convert my Dump()
calls to Dump(0)
to ensure I get results more quickly next time.
It certainly would be nice if LINQPad would do a breadth-first approach before expanding to deeper dump levels. Pressing Shift-F5 could in that case simply stop expanding at whatever level it had reached. If you agree, it might be a good enhancement to request on LINQPad's UserVoice site.