The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,868 other followers

Debugging a stackexchange memory leak while transitioning to .NET Core: by @Nick_Craver

Posted by jpluimers on 2020/01/14

Cool thread with steps (windbg) tooling and graphs: this is how you approach problem solving.

Easiest to read: [WayBack] Thread by @Nick_Craver: “Well hello there memory leak…let’s see what you are. It’s times when I type !dumpheap without an argument that cals. Alrighty, let’s see what these little guys are: Quite a bit of repetition in here – let’s root some of the […]”

Twitter thread below the fold.

[WayBackNick Craver on Twitter: “So let’s form our dictionary in batches EF Core will load, like this. We can lower our SQL roundtrips to n / 1000 + relevant changes. It’s more SQL trips than our original 1, but we aren’t needlessly loading a million users into memory. We load about 0.3% of that instead.… https://t.co/wgHpWgCoJH”

Tooling:

Related: Some notes/links on Windows Debugging CLR applications

A good WinDbg introduction is [WayBack] Getting Started with WinDbg (User-Mode) | Microsoft Docs.

Note that temp tables in SQL Server might look nice, but actually do not scale well: [WayBack] Lucas Trzesniewski on Twitter: “I’ve found out the following massively improves performance over queries with an IN clause with lots of parameters: – Open a transaction – Create a temp table – Bulk insert your IDs into the temp table – Inner join your query on the temp table And you only make a single query.… https://t.co/anwGSrxRqh”

–jeroen

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: