Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Painter: Excessive memory usage in PainterExamples moving window to edges of screen.
Painter: Excessive memory usage in PainterExamples moving window to edges of screen. [message #51173] Fri, 15 February 2019 08:21 Go to next message
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 44
Registered: June 2011
Member
Platform: Win7x64

Even the simplest examples cause large memory usage increases every time the window is moved to the edge of the desktop to prompt a resize until memory usage plateaus. Insufficient reclamation occurs - it will sustain high memory usage until another image is chosen. In sufficiently complex images moving to desktop extents rapidly will cause the application to freeze for a few seconds. Thoughts?
Re: Painter: Excessive memory usage in PainterExamples moving window to edges of screen. [message #51175 is a reply to message #51173] Fri, 15 February 2019 19:56 Go to previous messageGo to next message
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 44
Registered: June 2011
Member
https://i.imgur.com/jW3t7hY.png

The number of page faults also appears to increase significantly to around 30,000-40,000/second while moving the window to the extents, though I'm not sure how significant that is.

[Updated on: Fri, 15 February 2019 20:11]

Report message to a moderator

Re: Painter: Excessive memory usage in PainterExamples moving window to edges of screen. [message #51199 is a reply to message #51173] Tue, 19 February 2019 14:29 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11864
Registered: November 2005
Ultimate Member
jjacksonRIAB wrote on Fri, 15 February 2019 08:21
Platform: Win7x64

every time the window is moved to the edge of the desktop to prompt a resize until memory usage plateaus.



Somehow I cannot decifer what exactly this means... especially I am confused by "prompt a resize"... Smile

Other than that, what U++ version is this? 2018.1 or trunk?

Mirek
Re: Painter: Excessive memory usage in PainterExamples moving window to edges of screen. [message #51200 is a reply to message #51199] Tue, 19 February 2019 14:50 Go to previous messageGo to next message
peterh is currently offline  peterh
Messages: 39
Registered: November 2018
Location: Germany
Member
mirek wrote on Tue, 19 February 2019 14:29
jjacksonRIAB wrote on Fri, 15 February 2019 08:21
Platform: Win7x64

every time the window is moved to the edge of the desktop to prompt a resize until memory usage plateaus.


Somehow I cannot decifer what exactly this means... especially I am confused by "prompt a resize"... Smile


In Win7, if a window is moved, as soon as the mousearrow touches the outer margin of the deskop, Windows draws a resized ghost image of the window that is attached to the mouse and offers to resize the window automatically.

[Updated on: Tue, 19 February 2019 14:54]

Report message to a moderator

Re: Painter: Excessive memory usage in PainterExamples moving window to edges of screen. [message #51201 is a reply to message #51200] Tue, 19 February 2019 14:56 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11864
Registered: November 2005
Ultimate Member
peterh wrote on Tue, 19 February 2019 14:50
mirek wrote on Tue, 19 February 2019 14:29
jjacksonRIAB wrote on Fri, 15 February 2019 08:21
Platform: Win7x64

every time the window is moved to the edge of the desktop to prompt a resize until memory usage plateaus.


Somehow I cannot decifer what exactly this means... especially I am confused by "prompt a resize"... Smile


In Win7, if a window is moved, as soon as the mousearrow touches the outer margin of the deskop, Windows draws a resized ghost image of the window that is attached to the mouse and offers to resize the window automatically.


Ah, this, thanks!

Mirek
Re: Painter: Excessive memory usage in PainterExamples moving window to edges of screen. [message #51229 is a reply to message #51201] Sat, 23 February 2019 17:22 Go to previous messageGo to next message
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 44
Registered: June 2011
Member
Yes, that's what I meant. Sorry what I said was unclear.
Re: Painter: Excessive memory usage in PainterExamples moving window to edges of screen. [message #51230 is a reply to message #51229] Sat, 23 February 2019 18:30 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11864
Registered: November 2005
Ultimate Member
jjacksonRIAB wrote on Sat, 23 February 2019 17:22
Yes, that's what I meant. Sorry what I said was unclear.


Can you try with trunk? (I have made some optimizations).
Re: Painter: Excessive memory usage in PainterExamples moving window to edges of screen. [message #51231 is a reply to message #51230] Sat, 23 February 2019 19:09 Go to previous messageGo to next message
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 44
Registered: June 2011
Member
Sure, the memory usage appears to be a lot better now - going from 7.1 to 29.

https://i.imgur.com/SKTbbjg.png

The one example I am still having problems with is the Pythagoras tree causing the window to stop and lag when the image is clipped off the edge of the screen, though the memory usage is down on that as well so I think that's a separate issue.
Re: Painter: Excessive memory usage in PainterExamples moving window to edges of screen. [message #51243 is a reply to message #51231] Mon, 25 February 2019 09:11 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11864
Registered: November 2005
Ultimate Member
jjacksonRIAB wrote on Sat, 23 February 2019 19:09
Sure, the memory usage appears to be a lot better now - going from 7.1 to 29.

https://i.imgur.com/SKTbbjg.png

The one example I am still having problems with is the Pythagoras tree causing the window to stop and lag when the image is clipped off the edge of the screen, though the memory usage is down on that as well so I think that's a separate issue.


Pythagoras tree is extreme example. That one is slow no matter what...

Mirek
Re: Painter: Excessive memory usage in PainterExamples moving window to edges of screen. [message #51249 is a reply to message #51243] Mon, 25 February 2019 11:16 Go to previous messageGo to next message
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 44
Registered: June 2011
Member
Ahh, so if I wanted to keep fluid movement, I'd have to render it to an image or something else that would allow some stretching (that likely won't be noticed anyway) so the clipping computation becomes temporarily simpler?
Re: Painter: Excessive memory usage in PainterExamples moving window to edges of screen. [message #51255 is a reply to message #51249] Mon, 25 February 2019 12:06 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11864
Registered: November 2005
Ultimate Member
jjacksonRIAB wrote on Mon, 25 February 2019 11:16
Ahh, so if I wanted to keep fluid movement, I'd have to render it to an image or something else that would allow some stretching (that likely won't be noticed anyway) so the clipping computation becomes temporarily simpler?


Well, if you render things with similar complexity, then you definitely should take some steps...

Mirek
Re: Painter: Excessive memory usage in PainterExamples moving window to edges of screen. [message #51260 is a reply to message #51255] Mon, 25 February 2019 12:50 Go to previous message
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 44
Registered: June 2011
Member
Will do, then. Thanks, Mirek - the reduction in memory usage is great!
Previous Topic: Strange issue with text in Painter
Next Topic: Remove the transparent area around the image (sprite optimization)
Goto Forum:
  


Current Time: Sun May 26 09:39:30 CEST 2019

Total time taken to generate the page: 0.01315 seconds