Jump to content

lag over time


Recommended Posts

so I just installed the latest version and there is this strange lag over time with layer heavy projects. I start the large project and over time, using the layers will slowly lag my computer to the point that paint.net has to go unresponsive for minutes at a time. it doesn't even use much possessing power or anything.

Link to comment
Share on other sites

I wondered if it was worth trying the new .NET garbage collection shortcut? Ctrl+Alt+Shift+` (tick/tilde)

Link to comment
Share on other sites

 

these are my specs and it's on a 400 by 700 image but with a huge amount of layers, like 150 at this point. yeah I now it's a lot and my computer isn't that good but the thing is, this lag is new. pre-patch I could go up to 200+ before things would slow at all. something has changed or broken in this version for me. even smaller projects are showing signs as they grow.

 

Application    paint.net 4.1.1 (Final 4.101.6828.39058)
Build Date    Tuesday, September 11, 2018
Install type    Classic
    
Hardware accelerated rendering (GPU)    True
Animations    True
DPI    96.00 (1.00x scale)
Language    en-US
    
OS    Windows 10 Home x64 (10.0.17134.0) (0x65)
.NET Runtime    4.0.30319.42000
Physical Memory    4,095 MB
    
CPU    AMD Athlon(tm) II X4 640 Processor
    Speed    ~3000 MHz
    Cores / Threads    4 / 4
    Features    DEP, SSE, SSE2, SSE3
    
Video Card    AMD Radeon HD 6570
    Dedicated Video RAM    1,012 MB
    Dedicated System RAM    0 MB
    Shared System RAM    1,792 MB
    Vendor ID    0x1002
    Device ID    0x6759
    Subsystem ID    0x31981682
    Revision    0
    LUID    0x0000AE18
    Flags    SupportNonMonitoredFences, KeyedMutexConformance
    Graphics Preemption    DmaBufferBoundary
    Compute Preemption    DmaBufferBoundary
    Outputs    1
    Feature Level    Direct3D_11_0
    DXGI Formats    A8_UNorm, B8G8R8A8_UNorm, R16G16B16A16_UNorm, R16G16B16A16_Float, R32G32B32A32_Float
    Buffer Precision    UNorm8bpc, UNorm8bpcSrgb, UNorm16bpc, Float16bpc, Float32bpc
    
Video Card    Microsoft Basic Render Driver
    Dedicated Video RAM    0 MB
    Dedicated System RAM    0 MB
    Shared System RAM    2,047 MB
    Vendor ID    0x1414
    Device ID    0x008C
    Subsystem ID    0x00000000
    Revision    0
    LUID    0x0000B425
    Flags    Software, AcgCompatible, SupportMonitoredFences, SupportNonMonitoredFences, KeyedMutexConformance
    Graphics Preemption    InstructionBoundary
    Compute Preemption    InstructionBoundary
    Outputs    0
    Feature Level    Direct3D_12_1
    DXGI Formats    A8_UNorm, B8G8R8A8_UNorm, R16G16B16A16_UNorm, R16G16B16A16_Float, R32G32B32A32_Float
    Buffer Precision    UNorm8bpc, UNorm8bpcSrgb, UNorm16bpc, Float16bpc, Float32bpc

Link to comment
Share on other sites

39 minutes ago, redryan2009 said:

Physical Memory    4,095 MB

 

You should probably consider increasing your physical memory.  My laptop has 16,234 MB and it runs pretty well.

 

The more physical memory you have, the less Paint.NET needs to page that memory out to disk.

 

And, speaking of disk, you don't list what type of HDD you have, but if you upgrade to an SSD your performance will also improve.

Link to comment
Share on other sites

@BoltBait well I just pasted what Paint.net gave me, which doesn't seem to list my HDD. but this isn't my system. I've watch my memory usage through task manager and even though the program is lagging and freezing the system impact is mimumal, I don't know what's going on. and it's only when changing Layer factors like turn them on and off or creating new ones. at this point, I might need to find a way to back patch or something.

Link to comment
Share on other sites

2 hours ago, redryan2009 said:

@Zagna that is very close but it more lags when creating layers and editing them in ways such as turning them on and off.

Lag over time, Part Deux

After having paint.net just sitting in the background for the last hour, it is taking few seconds to toggle layers.

But, just switching to a different image and back, layers toggle as fast as normally.

Edited by Zagna

sig.jpg.7f312affa740bae49243c4439bc4a244.jpg

Link to comment
Share on other sites

@Zagna, I just made this post: 

 

 

Would you be willing to go through those steps? Tell WPR to start recording at about the same time as you'd start recording that video which showed the lag. Then, save the trace and send it to me (like it says in the instructions).

 

This should allow me to dig in and see what code is executing when things are slow.

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

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

forumSig_bmwE60.jpg

Link to comment
Share on other sites

To me, it simply looks like after 150 layers, you're just running out of memory and Paint.NET stutters as there is a slight delay when it is bringing tiles into memory from disk.

 

You could probably increase performance if you increased your RAM size from 4G to 16G and invest in an SSD.

Link to comment
Share on other sites

16 hours ago, Zagna said:

Lag over time, Part Deux

After having paint.net just sitting in the background for the last hour, it is taking few seconds to toggle layers.

But, just switching to a different image and back, layers toggle as fast as normally.

 

@BoltBait, I'd be inclined to agree ... except for the part where @Zagna says that performance goes back to normal after switching images and back

 

In fact, @Zagna, if you get around to the performance trace, please include both the "slow" layer switching, then wait a few seconds and switch to another image and back, then wait a few seconds, and then include the "fast" layer switching. Having a few seconds in between will allow me to see a visible difference in the CPU usage graph as it plumetts from non-zero to zero, then zero to non-zero, etc.

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

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

forumSig_bmwE60.jpg

Link to comment
Share on other sites

From the 3 traces you two sent me, my best guess is that the animation system is the culprit ... definitely room for some optimization there.

 

If you're able to reproduce this performance problem easily, then testing this hypothesis should also be easy. Go into Settings and un-check "Animations", and then try to reproduce the problem again. If it doesn't repro, then we've got our smoking gun :)

 

Animations being the culprit makes quite a bit of sense ... there is definitely some non-optimized code in there with is O(n) with respect to the # of layers. So you click on a layer, or move it, or scroll, or whatever ... and my code will go and update the animation state for every layer, even if it's not necessary to do so.

 

(Also, have you thought about buying a Core i9-7980XE? That might help too ... ??)

 

image.png

 

  • Like 1

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

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

forumSig_bmwE60.jpg

Link to comment
Share on other sites

With Animations turned off, doesn't seem to produce lag for layer toggling like it did before. But since it takes an indeterminate amount of time for the lag to manifest and I'm not sure if being minimized or in the background matters, it's complicated.

I'll try couple more times with Animations turned on. It's just waiting long enough.

sig.jpg.7f312affa740bae49243c4439bc4a244.jpg

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.

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