<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>I didn't think of that (interning the strings), however, I eliminated the repetition of whole lines, which turned out quite often. Fro example, there is a method that does translation (the Tr method, I think) which has an overload with r, c, n. Many classes use this method and instead of repeating the "r, c, n" line I just change the argNamesIndex to point to the single copy of this line. I believe this approach can be combined with interning.<br></span></div><div><span><br></span></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Richard Dale <richard.dale@telefonica.net><br>
 <b><span style="font-weight: bold;">To:</span></b> KDE bindings for other programming languages <kde-bindings@kde.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, April 10, 2012 9:15 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Kde-bindings] Qyoto: Patch - generate argument names from external files<br> </font> </div> <br>
On Tuesday, April 10, 2012 07:48:06 PM Arno Rehn wrote:<br>> On 09/04/12 20:45, Richard Dale wrote:<br>> > On Tuesday, March 20, 2012 02:10:58 PM Arno Rehn wrote:<br>> >> But I really would like to keep the Smoke lib as it is, for now.<br>> >> The next time we break BC in SMOKE, we should do it properly and<br>> >> introduce<br>> >> PImpl so we can add functionality as we like.<br>> > <br>> > I've started looking at Smoke bindings for Qt5 and the obvious place to<br>> > break binary compatibiltiy is when we do those.<br>> > <br>> > I think having argument names in the smoke libs is really useful. Would it<br>> > be possible to add some sort of option to smokegen so that it generates<br>> > argument names?<br>> > <br>> > Having an extra text file seems a bit clunky, and maybe we can get the<br>> > feature debugged with Qt5 bindings and add anything
 else we think is<br>> > important for the next BIC Smoke release. Then backport it to the Qt4<br>> > bindings when it is all 100% there and working?<br>> <br>> I agree about the argument names in text files being clunky; still I<br>> don't think it's such a good idea to include them in the SMOKE libs<br>> themselves.<br>> Argument names aren't required for running apps; it's really only useful<br>> if you generate bindings and wastes memory in all other cases. Has<br>> anyone done some measurements on how much larger a smoke libs is when we<br>> include argument names?<br>Does Dimitar's patch intern the strings for the argument names so that you <br>don't store the string 'arg1' for every single method where it is used, but <br>instead give it an int identifier like Smoke handles type names.<br><br>> Maybe we can compress the argument names with bzip2 or lzma and then<br>> include them in the library.
 Considering that they are plain text, it<br>> should work reasonably well. Decompression will then be done on demand<br>> and shouldn't have an impact on normal apps.<br>I think interning the strings would work quite well because there is probably <br>a lot of repetition in argument names.<br><br>I see an important use case being the smokeapi tool or whenever you want to <br>introspect the Smoke libs - it looks a lot better and is more meaningful with <br>the original argument names.<br><br>-- Richard<br>_______________________________________________<br>Kde-bindings mailing list<br><a ymailto="mailto:Kde-bindings@kde.org" href="mailto:Kde-bindings@kde.org">Kde-bindings@kde.org</a><br><a href="https://mail.kde.org/mailman/listinfo/kde-bindings" target="_blank">https://mail.kde.org/mailman/listinfo/kde-bindings</a><br><br><br> </div> </div>  </div></body></html>