What can be disabled for iPhone Optimisation

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Garfinkle
Posts: 36
Joined: Wed Jul 07, 2010 11:35 am
Location: Manchester, UK

What can be disabled for iPhone Optimisation

Post by Garfinkle »

Hi All,

Just wondering, as my project is only targeting the iPhone, are there any sections of the irrlicht engine that I can completely disable or remove from the libraries to keep them smaller and faster?

Thanks in advance.
kvakvs
Posts: 30
Joined: Wed Oct 14, 2009 1:50 am
Location: Sweden
Contact:

Post by kvakvs »

In irrcompileconfig.h (if i remember correct the file name, but you should have no trouble finding it anyway) there is plenty of options to be disabled. Few of them are depending on others, but you will figure that fast, when it will refuse to link without something, you recently have disabled.
Garfinkle
Posts: 36
Joined: Wed Jul 07, 2010 11:35 am
Location: Manchester, UK

Post by Garfinkle »

Thanks kvakvs, I'll have a look through :D
Garfinkle
Posts: 36
Joined: Wed Jul 07, 2010 11:35 am
Location: Manchester, UK

Post by Garfinkle »

By commenting out the functions that I won't be using, psd image support etc...i have managed to jump from approx 30 fps to 50 - 60 fps.... definately an improvement in my books :D
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

o.0

What does the size of the library have to do with execution speed?
Garfinkle
Posts: 36
Joined: Wed Jul 07, 2010 11:35 am
Location: Manchester, UK

Post by Garfinkle »

By disabling particular functions, then specific checks are not made during the execution of other methods, such as file format checking, graphics rendered checking etc.

Also by having a smaller library then less code needs to be loaded in to memory at run time allowing for more memory to be allocated to other areas resulting in fast loaded and processing.
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

Garfinkle wrote:By disabling particular functions, then specific checks are not made during the execution of other methods, such as file format checking, graphics rendered checking etc.
Sure, but I don't think these checks happen as much as you think - if you look at the source, you'll find that most of it is abstracted (for example, image file format is completely irrelevant once the image is loaded thanks to the IImage interface).
Garfinkle wrote:Also by having a smaller library then less code needs to be loaded in to memory at run time allowing for more memory to be allocated to other areas resulting in fast loaded and processing.
Faster loading time, yes. Faster processing, not necessarily, unless you start talking about cache coherency. RAM is just that - random access. You can access anywhere in the RAM in the same amount of time.
Garfinkle
Posts: 36
Joined: Wed Jul 07, 2010 11:35 am
Location: Manchester, UK

Post by Garfinkle »

slavik262 wrote: Faster loading time, yes. Faster running, not necessarily, unless you start talking about cache coherency.
Faster running is more noticable on devices such as the iPhone due to the limited memory capacity. By having less running natively in the engine allows you that bit extra memory capacity to load more objects in cache (which in turn allows you to write code that can use this cached information). Therefore you gain those few extra Frames.
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

Garfinkle wrote:By having less running natively in the engine
The size of the library does not change the number of processor registers. The same "amount" is always running.
Garfinkle wrote:...that bit extra memory capacity to load more objects in cache (which in turn allows you to write code that can use this cached information). Therefore you gain those few extra Frames.
What on earth do you mean? The processor cache isn't something you can directly control; you can only try to increase cache coherency by writing efficient code. You can't "load more objects" into it. Are you just talking about the RAM itself? I know iPhones and other embedded devices have a RAM limit, and I'm not disputing that Irrlicht runs faster on the iPhone when you strip unneeded stuff out, but you're not making sense.
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Post by ent1ty »

I think he's trying to say that smaller library leaves more free RAM
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
Post Reply