Jump to content

EXTREME DPC Lag After Program Being Open for a While and/or When Applying Live Filters

Recommended Posts

Yes, I know that live filters should cause some lag because they are more complicated to do. But read on and you will realize that the lag is a lot more severe than one would expect. I suspect there is a memory leak or something like that, since it gets much worse as time goes on.

I know this lag is to be expected, since 24 MP + Live Denoise = lag. But here's where the problem is: I just sat at my computer for 3 minutes straight, with my CPU pinned at 100% on all 12 threads for the entire time. Why? Because I zoomed out, and Affinity Photo had to render new parts of the scene. It caused the program to not go through with any operations (like saving the file) before it finished rendering. And it was not going to finish rendering any time soon. I only had two live unsharp masks (one set to darken, one set to lighten) and I tried to do a denoise afterwards. Affinity Photo did not like that, especially because I had the program open for 30 minutes (and it gets worse the longer the program is open). I had to close the program in task manager.

I have a Ryzen 5 1600 6 core, 12 thread processor, 8gb of RAM, running Affinity Photo on an SSD, with a GTX 970 4gb. 

The program has some hardcore software aging (this kind of software aging) on my system, although it doesn't appear to just be a memory leak. The biggest problem over time is CPU usage, it appears. I find that, as the program is open for a while, my CPU usage likes to go up to 100% more and more often. 100% CPU usage means a lot on my CPU... I don't even see it go above 50% usage when playing a game like Battlefield 1. After editing a few files, the program just crashes. I do close out of images as I go, so I only have 1 image open at once.

On top of all of this, I even get DPC latency while applying things like noise reduction, sharpening, etc, meaning that audio distorts while using the program and my mouse cursor even lags. Note, however, that I do not have a DPC latency problem on my PC; all other programs function flawlessly. Here's my Latency while watching a 4K 60fps video on YouTube, something that is notorious for causing dropped frames on people's computers: 



And here is what happens when I do a few different live filters, like denoise, clarity, and unsharp mask in Affinity Photo:



And my CPU usage suddenly looks like this:



Even if Affinity Photo goes ahead and uses 100% of my CPU, It certainly should not be causing DPC dropouts...  rendering in Blender, for instance, also uses up 100% CPU. But the DPC latency is perfectly fine on my PC while rendering with Blender:



I love Affinity Photo, but this general lag in the software has been something I never had to deal with in Photoshop. When Photoshop lagged, it came back from its lag without crashing or causing my mouse cursor to lag or my audio to distort (i've never seen a program cause DPC latency before). Affinity Photo is sometimes faster than Photoshop, like with the Lens Blur tool or Liquify Tool, but it self destructs when doing things like noise reduction, sharpening, etc, and it eventually just crashes.

Devs / people of the forums, do you get the same sort of DPC latency when using Affinity Photo? What are your computer specifications? Perhaps Affinity Photo does not like one of my drivers, as DPC latency often comes from driver conflicts.

Share this post

Link to post
Share on other sites
6 hours ago, Mark Ingram said:

Hi @HuniSenpai, I'd be interested to know your opinion on the latest beta ( at time of writing). I've been trying to solve this problem recently, and I believe it's much better than it was previously.

Hey! I will go ahead and download that version. Thank you for letting me know; fingers crossed that the lag is being fixed (especially the DPC latency, that's downright miserable). I'm hopeful for the "fixed memory leak" part of the change log  I'll let you know once I've got it downloaded; my internet is pretty slow so it'll take a bit. P.S. I'm using 1.6.5 right now. 

Edited by HuniSenpai

Share this post

Link to post
Share on other sites
8 hours ago, Mark Ingram said:

Hi @HuniSenpai, I'd be interested to know your opinion on the latest beta ( at time of writing). I've been trying to solve this problem recently, and I believe it's much better than it was previously.

You are incredible. Seriously. I have no idea what you and/or other Affinity devs did, but the program is running way faster in so many ways. To be honest, even though it's a beta, I'm going to use this instead of 1.6.5 because, after an hour of use, it's already more stable than the last version. It has not crashed yet, whereas the last version would have probably crashed twice already. 

I still did manage to recreate it, but it wasn't as severe. And I didn't get any audio distortion. The only way that I managed to recreate it was by having a live unsharp mask, and then a whole bunch of live denoise filters. I just kept doing crl + j until I had about 5 of them. Then Affinity Photo went to 100% usage on all 12 threads for more than a minute or two (at which point I closed the program, because I don't like stressing my CPU when I don't need to). It seems like the time it takes to process these denoise filters grows exponentially, since 1 denoise is instant, two is over twice as slow, and then 3 or more can literally take minutes. I'm not sure why it's not a linear performance slowdown; I suppose there's some technical reason in the code.

This is the absolute worst latency I managed to get while running the new version (and I was really pushing it hard, zooming in / out / panning around while at 100% cpu usage). I didn't even get into the red this time:


Also, the program does not seem to have a memory leak anymore. I just edited 5 RAW photos, ranging from 16 MP to 24MP, even leaving them all open as I went, and I had no slowdown.

Affinity Photo 1.6.5  was biting off more than it could chew, and proceeding to choke to death on it. The new Affinity Photo beta still bites off more than it can chew, but it doesn't choke to death in the process. It eventually finishes what you told it to do, without crashing. :D 


P.S. oh my gosh they finally allowed you to use HSL as a sort of "replace color" filter. Woooo!!!!


Share this post

Link to post
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.
Note: Your post will require moderator approval before it will be visible.

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...

Important Information

Please note the Annual Company Closure section in the Terms of Use. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.