[Kde-bindings] Qyoto: Patch - generate argument names from external files
richard.dale at telefonica.net
Tue Apr 10 18:15:44 UTC 2012
On Tuesday, April 10, 2012 07:48:06 PM Arno Rehn wrote:
> On 09/04/12 20:45, Richard Dale wrote:
> > On Tuesday, March 20, 2012 02:10:58 PM Arno Rehn wrote:
> >> But I really would like to keep the Smoke lib as it is, for now.
> >> The next time we break BC in SMOKE, we should do it properly and
> >> introduce
> >> PImpl so we can add functionality as we like.
> > I've started looking at Smoke bindings for Qt5 and the obvious place to
> > break binary compatibiltiy is when we do those.
> > I think having argument names in the smoke libs is really useful. Would it
> > be possible to add some sort of option to smokegen so that it generates
> > argument names?
> > Having an extra text file seems a bit clunky, and maybe we can get the
> > feature debugged with Qt5 bindings and add anything else we think is
> > important for the next BIC Smoke release. Then backport it to the Qt4
> > bindings when it is all 100% there and working?
> I agree about the argument names in text files being clunky; still I
> don't think it's such a good idea to include them in the SMOKE libs
> Argument names aren't required for running apps; it's really only useful
> if you generate bindings and wastes memory in all other cases. Has
> anyone done some measurements on how much larger a smoke libs is when we
> include argument names?
Does Dimitar's patch intern the strings for the argument names so that you
don't store the string 'arg1' for every single method where it is used, but
instead give it an int identifier like Smoke handles type names.
> Maybe we can compress the argument names with bzip2 or lzma and then
> include them in the library. Considering that they are plain text, it
> should work reasonably well. Decompression will then be done on demand
> and shouldn't have an impact on normal apps.
I think interning the strings would work quite well because there is probably
a lot of repetition in argument names.
I see an important use case being the smokeapi tool or whenever you want to
introspect the Smoke libs - it looks a lot better and is more meaningful with
the original argument names.
More information about the Kde-bindings