Jump to content

How to submit a performance trace

Recommended Posts

This post will give instructions on how to submit something called a "performance trace file", which will allow me to inspect pretty much everything going on during Paint.NET's execution at a very low level. I'll use something called Windows Performance Analyzer to load the trace and look at what code is executing across all of the threads and CPU's, file accesses, etc. It's very good for finding bottlenecks and figuring out what code is being problematic. Bruce Dawson's blog has a lot of cool posts where he shows himself using it to figure out all sorts of weird problems.


This is useful for when things are "slow" and we need to figure out what's causing it.


1. You need to install the Windows Performance Toolkit. Do this by going to https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install, click to download the "Windows ADK", and then within the installer choose to only install the Windows Performance Toolkit.


2. Once that's completed, go to the Start menu and find Windows Performance Recorder ("WPR" from now on). It should look about like this:




3. Click the Start button ... 




4. ... and wait for the button to change to saying "Save", which indicates it has initialized and is now "recording"




4. Start Paint.NET and reproduce the performance problem. When sending the trace, make sure to include a description of what you're doing!


Note that performance traces should usually be kept to about 1 or 2 minutes maximum because they can get really big, really fast. I opened a 5 minute trace the other day while I was working on startup performance and it took 20GB of memory to load!


[TODO: add illustrative screenshot or GIF or something)


5. Click the Save button over in WPR ...




6. ...and  then click the Save button again on the next screen. There's no need to type anything into the description area, but you can if you'd like.




6. Wait for the progress bar to finish and for the buttons to change from Save/Cancel to Open in WPA/Open Folder/OK... (the progress bar may 'stick' at 100% for awhile.....)


7. Click on the "Open Folder" button, which will open an Explorer folder and highlight the performance trace file




8. This is important: I need both the ETL file and the folder with the same name that ends in NGENPDB. Select both of these, then right click and choose Send To -> Compressed (zipped) folder.




9. Now send me that zip file to contact@getpaint.net . You can e-mail it as an attachment or give me a link to a cloud file sharing location like Dropbox, Google Drive, Microsoft OneDrive, etc.




10. Feel free to delete the trace files from your computer. They can be BIG. But at least they compress well :)


NOTE: Performance traces can include details about file accesses that are happening on the system at that time. For that reason, I recommend you first close any applications that may be sensitive and/or that you don't want to inadvertently share. The contents of files are not included, however file and path names are. 


The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html


Link to comment
Share on other sites

28 minutes ago, sh0sh1n said:

I would suggest adding a new link in one of your placeholders for the Windows 10 version...


You only need to install the Windows Performance Analyzer from that download, it does not matter whether you get it from the Windows 10 or Windows 11 installers.


28 minutes ago, sh0sh1n said:

...the Win10 links aren't very easy to find for the layperson!


The older SDK downloads are listed further down on that page.



Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...