Keep going, you have so much things to remove:
* classes and functions you don't use
* if you don't need override virtual functions - make them non virtual
* if you don't need access to protected\private functions exclude them
* it is possible to move all enumerations to Python
> Roman once mentioned that C++ templates play a significant role in
> wrapper size. can you explain? why is that?
C doesn't have overloading, so the linker can put function name only
within dll and everybody will happy.
C++ has overloading, namespace and template - all these information
should be part of the final function name. Of course the name became
bigger - much bigger.
I suggest you to use Google to find better answer to your question.
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
I think, we can join the effort here and convert doxygen format to
reStrucuturedText one. May be not complete but, some subset.
Then this "doc_extractor" could become part of Py++.
I could be wrong, but Python-Ogre development is driven by use cases.
The main Andy's use case is: provide access to **all** Ogre API. What
is your use case? Why the size of the project matter to you ( so much
)?
I could be wrong, but Python-Ogre development is driven by use cases.
The main Andy's use case is: provide access to **all** Ogre API. What
is your use case? Why the size of the project matter to you ( so much
)?
Do you have a good subset definition of what you need?
Do you have a good subset definition of what you need?
> Publishers of games for casual market complain about sizes. A lot :)
>
> And it makes no sense if the wrapper library is 50% of game size if it could
> be 10%. For example, installer of our game that is going gold in a few hours
> is 90MB in size. Game itself takes 145MB when installed. That is with
> PythonOgre included. You can see that significant decrease of size of
> wrapper would mean a significant decrease in overall game size.
I could be wrong, but Python-Ogre release build doesn't contain debug
information. Also, AFAIK MSVC compiler stores debug information
outside of the binary ( executable and .dll ). Same is possible with
gcc. I have SCons custom builder that does this,
> Also, looking back to the discussion, I don't think private and protected
> interfaces need documentation for anything except internal debugging (that
> is, users of library - that is, programmers) should never access private
> interfaces, thus they don't need documentation on it in the default build.
This is just one example: http://en.wikipedia.org/wiki/Template_method_pattern
Ogre has a lot of functionality under "protected" level, which is
available for C++ developers in the derived classes, hence it should
be available to Python developers too.
This is just one example: http://en.wikipedia.org/wiki/Template_method_pattern
> Also, looking back to the discussion, I don't think private and protected
> interfaces need documentation for anything except internal debugging (that
> is, users of library - that is, programmers) should never access private
> interfaces, thus they don't need documentation on it in the default build.
Ogre has a lot of functionality under "protected" level, which is
available for C++ developers in the derived classes, hence it should
be available to Python developers too.
I think, that you should define your use case better.
As I see it right now, you are asking to do some work without being
sure it will solve your problem.
For example: disabling documentation strings saved you 1.4 Mb - +/- 1%
of the final dll file. It's not worth to add such option, may be in
future.
Same could be true for private and protected functions.
Sorry, I didn't mean to hurt you. I tried to understand better your use case.
> Also, size is not that important, I'm doing this research only because
> I'd like to know how much size can I remove from the wrapper, and in
> that process learn more about pyhton ogre internals.
You will be able to reduce the size, by defining a closed subset of
classes, that you use for your game and excluding everything else.
I hope the following link, will help you to understand better the idea
and design behind Python-Ogre:
http://www.language-binding.net/pyplusplus/pyplusplus.html