Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Memory Usage - SetIntendedDeviceSize()

Author
Message
Grumpy Jedi
14
Years of Service
User Offline
Joined: 16th Jan 2010
Location:
Posted: 20th Apr 2013 17:33
I've been working on optimizing my app so it's as lean on memory use as possible. I was trying out SetIntendedDeviceSize().

The documentation doesn't really make clear exactly how it works so using my best guesses I tried everything I could think of.

I tried it with high resolutions plugged in, and then running my app in a low resolution window - No change in memory usage at all.

I tried it with low resolution plugged in, and then running at a low resolution - Again no change at all.

I tried using the command before image loading, and I tried using it after image loading - No change at all.

So I'm wondering if I'm just using it wrong or if it's like that light switch in an old house that doesn't actually control anything

I think the real problem though is that with 108.11 a hello world app is now using 50MB of ram. Compared to ram usage of half that in 1075.

Loading all libraries (needed or not) I think has become an issue. If a user has a current gen device, it's not really a problem since they have more ram. However devices that are just a gen old in some cases barely have enough ram to run the OS with very little left over. Having an app use up 50MB before it even loads it's own code and media is a big limitation if you want to support those devices.

Anyone else had luck with SetIntendedDeviceSize() ?
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 20th Apr 2013 18:01
Correct me if I'm wrong, don't have access to the help files. Doesn't that just alter how the screen is rendered? Thus it doesn't affect RAM usage.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 20th Apr 2013 18:10
Description for SetIntendedDeviceSize -
Quote: "Sets the size of the device you have designed all your artwork for, this allows AppGameKit to downsize the images to save memory on lower resolution devices. "


It does appear that it is intended to save memory. But does not say how it is supposed to be used.

I'm betting this is a command that was intended to do something, but never quite got implemented.

Grumpy Jedi, how are you measuring memory usage?

The size of the compiled/packaged app will not be changed by this command because it won't affect the media associated with the app.

I would guess that it was intended to somehow reduce the memory used for each image when it is loaded. Somehow compressing the image for a smaller resolution one. So, in theory, the loaded app would use less memory.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Grumpy Jedi
14
Years of Service
User Offline
Joined: 16th Jan 2010
Location:
Posted: 20th Apr 2013 19:07
Quote: "Grumpy Jedi, how are you measuring memory usage?"


I was just checking the memory usage of the running process in windows.

I didn't bother compiling it for iOS and checking the memory usage because it doesn't seem to work.
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 20th Apr 2013 19:57
Seems that you should specify the resolution you created your art for. Then, if you are using a device with a smaller screen it will use less memory. Like you make it for 800x480 but the screen of the device is only 400x280. So, if it even works on PC you have to set the size of your window to be much smaller than what you specify with the command. But you may have to test it on a device with a low resolution screen to get a result.

Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 21st Apr 2013 02:16
Quote: "Seems that you should specify the resolution you created your art for. Then, if you are using a device with a smaller screen it will use less memory. Like you make it for 800x480 but the screen of the device is only 400x280."


Correct, and the memory in question is GPU memory which Windows doesn't display per process. It doesn't affect RAM usage.
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 22nd Apr 2013 21:54
Quote: "Correct, and the memory in question is GPU memory which Windows doesn't display per process. It doesn't affect RAM usage. "

I have missed that this command whas done already

I know you paul mentioned this when we discussed memblocks and to downsize images to save memory

I understand why tgc are not to keen to support compressed textures as there dont seam to be a single format that works well on all devices.
I read this on an nivida tegra site.

Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz

Login to post a reply

Server time is: 2024-11-24 11:43:40
Your offset time is: 2024-11-24 11:43:40