[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Python Bindings Memory Usage
From:       Phil Thompson <phil () river-bank ! demon ! co ! uk>
Date:       1999-04-18 14:22:15
[Download RAW message or body]

weis@stud.uni-frankfurt.de wrote:
> The question I am interested in is: How many kB of compiled code
> does the python wrapper add for each C++ clas wrapped ?

That depends entirely on the class - what it's super-classes are, how
many member functions, how many of them are protected or virtual.  To be
more accurate it depends on what you've chosen to implement in the
specification file.

> In addition I thought of some optimizations:
> a) never wrap something that can be done in pure python. That means every
>    class in qt/src/tools does not need mapping ( at least none comes to my
>    mind yet )

This is done for QString and can easily be done for other things (eg
QPoint, QRect) so long as people are happy to lose the member functions.

> b) QWidget::event is evil. It takes too much time to call a python
>    function for every event coming in.

You only call a Python function for the events you want to handle in
Python.  The alternative would be to re-design the event handling
mechanism in Qt - or hide it (back to the thin C++ layer again).

> But I think b) and some related topics only apply if you dont code
> entire applications in Python.

Do you have a list of the classes and member functions you want access
to from Python for KOffice?  It would be really simple for me to create
bindings for those to see what the size would be.

Phil

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic