Smaller DLL suggestion
Smaller DLL suggestion
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
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
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.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
If you do the above, the .dll ends up lass than half the size of the original, at least in my projects.
Re: Smaller DLL suggestion
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
Regards Stickybit
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.
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.
-
kburkhart84
- Posts: 277
- Joined: Thu Dec 15, 2005 6:11 pm
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.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.
-
rogerborg
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
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
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
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?
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/
IrrLua - a Lua binding for Irrlicht
http://irrlua.sourceforge.net/
-
monkeycracks
- Posts: 1029
- Joined: Thu Apr 06, 2006 12:45 am
- Location: Tennesee, USA
- Contact:
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 Lolmonkeycracks wrote:Then you'd have doodoo loads of .dll's in your main game executable location...That's not exactly nice-looking or anything.zenaku's post
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/
IrrLua - a Lua binding for Irrlicht
http://irrlua.sourceforge.net/