Smaller DLL suggestion

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
StickyBit
Posts: 94
Joined: Mon Jul 05, 2004 3:40 am
Location: Sønderup, Denmark
Contact:

Smaller DLL suggestion

Post by StickyBit »

Hi guys

The Irrlicht DLL has become kinda big, which I think is a bit annoying.

How about createing some function that could monitor the application's use of the Irrlicht DLL and generate a report for use in compiling a stripped down version of the DLL? Would that be possible?

Regards Stickybit
kburkhart84
Posts: 277
Joined: Thu Dec 15, 2005 6:11 pm

Re: Smaller DLL suggestion

Post by kburkhart84 »

StickyBit wrote:Hi guys

The Irrlicht DLL has become kinda big, which I think is a bit annoying.

How about createing some function that could monitor the application's use of the Irrlicht DLL and generate a report for use in compiling a stripped down version of the DLL? Would that be possible?

Regards Stickybit
I don't think a few MBs is hardly anything when you see what the overhead on other engines is. But even so. You can recompile the file yourself. The project has a compile option file that you modify defines to, and Irrlicht compiles fine that way. For example, I know Irrlicht has some things that work in DX, some in GL, some in both. It is probably easier to just pick one and be done with it. So during deevelopment, I use the full size dll. But for deployment, I would recompile a new .dll with no sofware renderers, no DX8, and more than likely no GL either. It is easy in my case because I still use DX for sound and input, so I might as well for graphics as well. Plus, on my older computer, the parallax mapped material won't work in GL, but DX it will. It is an ole ATI 9200 card, which simply supports DX a little better. So since I'm doing stuff mainly for windows, I use DX and probably won't compile GL into it either. If you are going for multi-platform, then you could nix DX out and do only GL, because GL works on windows anyway, and everything else.
If you do the above, the .dll ends up lass than half the size of the original, at least in my projects.
roxaz
Posts: 575
Joined: Tue Jan 23, 2007 8:35 pm
Location: LT

Post by roxaz »

1.45MB dll is big? you must be joking. somewhere i had some textures with size of 2MB+ each. yes, for texture which does almost nothing its a lot, but for the 3d engine it is very very little. if you dont like sizes - use OGRE instead, its as small as ogres theirself :lol:
jrm
Posts: 111
Joined: Tue Dec 13, 2005 8:57 pm

Post by jrm »

Ever Tried UPX? it compresses DLLs and EXEs. Can make it smaller. But is supposedly uses more RAM or something like that after it is compressed.

JRM
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

lol big.

you guys tickle me. :lol:

he just wants to email/IM his poop over and over to 30-50 people he does know and don't care.

dude make an installer that locates the dll or something.
StickyBit
Posts: 94
Joined: Mon Jul 05, 2004 3:40 am
Location: Sønderup, Denmark
Contact:

Post by StickyBit »

Midnight wrote:lol big.
he just wants to email/IM his ***** over and over to 30-50 people he does know and don't care.
huh?
StickyBit
Posts: 94
Joined: Mon Jul 05, 2004 3:40 am
Location: Sønderup, Denmark
Contact:

Re: Smaller DLL suggestion

Post by StickyBit »

Using the compile config file actually gives some useable results, but I found that disabling unneeded functions, like meshloaders and stuff like that, is usefull to - so it would be nice to se a much more detailed compile config file.

Regards Stickybit
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

I agree it would be useful to have defines to skip unwanted mesh loaders, that way we can add every concievable mesh format without worrying about the size of the dll too much.
Also some people might not need the GUI, or maybe they'd prefer to compile without the default nodes and factories. These things are quite big and should probably be optional.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
kburkhart84
Posts: 277
Joined: Thu Dec 15, 2005 6:11 pm

Post by kburkhart84 »

bitplane wrote:I agree it would be useful to have defines to skip unwanted mesh loaders, that way we can add every concievable mesh format without worrying about the size of the dll too much.
Also some people might not need the GUI, or maybe they'd prefer to compile without the default nodes and factories. These things are quite big and should probably be optional.
Some of this might be useful to be able to change. The loaders aren't really that much code, but several of them might be worth it, especially if you only actually use 2 types in your game. I've not used the factories yet, but the default nodes(if you mean terrain, and particle, etc...) I use often, and I think most people would too. I would use the GUI for sure and I think most people would, except for demo type things. So yeah, these things would be useful to implement overall for everybody.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

I do agree that making Irrlicht more modular would be useful, but there's always a maintenance headache with #ifdefs; you can't expect people to check every combination when submitting patches, so the risk of various #if'd out components getting borked is high and ongoing.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
IPv6
Posts: 188
Joined: Tue Aug 08, 2006 11:58 am

Post by IPv6 »

bitplane wrote:Also some people might not need the GUI, or maybe they'd prefer to compile without the default nodes and factories. These things are quite big and should probably be optional.
+1! GUI and mesh loaders can be easily def-guarded and it helps get rid of unused stuff
zenaku
Posts: 212
Joined: Tue Jun 07, 2005 11:23 pm

Post by zenaku »

The project should be made modular. Currently it is one monolithic DLL. Internally Irrlicht's code is already pretty modular, only the build system and file paths really needs updating.

Instead of Irrlicht.dll, you'd get:

Irrlicht.core.dll
Irrlicht.video.dll
Irrlicht.gui.dll
Irrlicht.scene.dll
Irrlicht.io.dll

etc.

That way you could use just what you needed. Things like mesh loaders could be further broken down if needed, e.g. Irrlicht.scene.meshloader.MD2.dll, Irrlicht.scene.meshloader.COLLADA.dll. No need of #ifdef's everywhere if it's all seperated out into different modules. I dunno what do you guys think?
-------------------------------------
IrrLua - a Lua binding for Irrlicht
http://irrlua.sourceforge.net/
messen
Posts: 25
Joined: Tue Aug 29, 2006 2:51 pm
Location: Agalon
Contact:

Post by messen »

Hi!

Hmmm. Like OgrIrr? 8) :lol:

Btw. It is a good idea, to make irlicht modular, but not like ogre.
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

zenaku's post
Then you'd have doodoo loads of .dll's in your main game executable location...That's not exactly nice-looking or anything.
zenaku
Posts: 212
Joined: Tue Jun 07, 2005 11:23 pm

Post by zenaku »

monkeycracks wrote:
zenaku's post
Then you'd have doodoo loads of .dll's in your main game executable location...That's not exactly nice-looking or anything.
I guess it would be better to have one big, monolithic file called Game.exe, right? Why even have a dll? Static link! No directory structure, no media files. Just bundle it all into one huge Game.exe Lol ;)

With separate dlls you can use what you need and discard the rest. You can't do that with a monolithic dll. You have to resort to #ifdefs and recompiles. Also you could override the behavior at runtime. As an example, If your game used irrlicht.gui.dll, I could make my own super spiffy gui that uses the same ABI (application binary interface) and drop it into your app folder. I wouldn't have to recompile your game, just the gui dll. You can't do that with the monolithic version.

I'd much rather have a ton of .dlls than a ton of #ifdefs. I don't know how ogre does it, but better design is better design. Compiling everything into one huge dll is not good design. It works for a while because projects start out small, but as a project grows it needs to be spread out into modules, IMO.
-------------------------------------
IrrLua - a Lua binding for Irrlicht
http://irrlua.sourceforge.net/
Post Reply