ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 PhotoEn2 sample consuming very high memory

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
yogiyang Posted - Dec 27 2013 : 04:25:52
I have modified the demo PhotoEn2 to load two different .PSD files keeping the layers of each files as it is.

Now when I load just two files (.psd) at a time the RAM usage of the software goes extremely high. It goes as high as 1.5 GB.

Why must this be happening?

Can someone help me get a hand over this problem please?

I am not able to attach sample files to this post as the original file size are very big (50 MB).

Oh! btw I am using Delphi2007.

TIA

Yogi Yang




Yogi Yang
9   L A T E S T    R E P L I E S    (Newest First)
yogiyang Posted - Dec 30 2013 : 06:04:41
quote:
3. To get the best performance from the app that loads these very large PSD images you should compile the application as Win64. By using a memory mapped IEBitmap along with 64-bit is about the best you can do to provide the most available ram. Unfortunately, you need a more recent version of Delphi to compile as Win64.

I am using Delphi2007 so 64Bit is off limit for me.


Yogi Yang
Uwe Posted - Dec 29 2013 : 12:58:01
64bit can address a lot more RAM, so manipulation of very large images can be much faster than 32bit. There's a good chance though that a 64bit application is slower than a 32bit program on a 2GB RAM system for example.

Uwe
w2m Posted - Dec 29 2013 : 12:35:38
I was referring to ImageEn with Win64 with LegacyBitmap = False, so we are just using TIEBitmap not TBitmap.

William Miller
Uwe Posted - Dec 29 2013 : 12:28:47
William

Depends on what you want to do. For various reasons, 64bit applications might either be slower than their 32bit counterparts, or show no observable difference in execution time.

http://stackoverflow.com/questions/1282206/what-are-the-lower-level-advantages-and-disadvantages-of-64-bit-32-bit

Uwe
w2m Posted - Dec 29 2013 : 12:03:45
Uwe:

You do not think a Win64 app with LegacyBitmap = False provides the optimum with respect to speed and memory availability?

Why not?

William Miller
Uwe Posted - Dec 29 2013 : 11:56:40
William

quote:
To get the best performance from the app that loads these very large PSD images you should compile the application as Win64.

Not necessarily. On an ancient test PC, my 32bit application loads a 40MB *.psd file (including metadata and histogram creation) in less than half a second, and I don't see a spike in memory usage as Yogi Yang did. The problem must be somewhere else.

Uwe
w2m Posted - Dec 29 2013 : 09:11:22
How are you determining ram usage?

Based on my testing with your images I suspect the ram usage you see is high for a few reasons.

1. The PSD images you are loading are very large.

2. You are probably using LegacyBitmap := True which uses a TBitmap to hold the images. I suspect that if you set LegacyBitmap to False and use a memory mapped IEBitmap instead of a Bitmap the ram usage will be less.

3. To get the best performance from the app that loads these very large PSD images you should compile the application as Win64. By using a memory mapped IEBitmap along with 64-bit is about the best you can do to provide the most available ram. Unfortunately, you need a more recent version of Delphi to compile as Win64.

Here I am using Delphi XE4 on Windows 8.1 and my demo app can be compiled as Win32 or Win64 using LegacyBitmap := False.

I'll send you the demo as soon as I finish my testing.

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
yogiyang Posted - Dec 27 2013 : 22:24:25
Thanks William,

I have emailed you the files.




Yogi Yang
w2m Posted - Dec 27 2013 : 09:03:04
If you would like, email me the images and I'll try here.

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html