----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/108916/#review27261 -----------------------------------------------------------
services/storage/rcgen/nepomuk-simpleresource-rcgen.py <http://git.reviewboard.kde.org/r/108916/#comment20524> It's better to keep the -*- coding line. services/storage/rcgen/nepomuk-simpleresource-rcgen.py <http://git.reviewboard.kde.org/r/108916/#comment20525> Empty containers are implicitly false. Beter to write it as if not parentClassNames: services/storage/rcgen/nepomuk-simpleresource-rcgen.py <http://git.reviewboard.kde.org/r/108916/#comment20526> If all these Soprano.Vocabulary() etc calls only return strings, why not write "aliases" at the module top that are shorter and easier to read? IOW NRL_cardinality = Soprano.Vocabulary.NRL.cardinality().toString() and so on services/storage/rcgen/nepomuk-simpleresource-rcgen.py <http://git.reviewboard.kde.org/r/108916/#comment20527> if parentClassNames: (same for every len > 0) services/storage/rcgen/nepomuk-simpleresource-rcgen.py <http://git.reviewboard.kde.org/r/108916/#comment20528> if not parentClassNames: (and elsewhere in the file) services/storage/rcgen/nepomuk-simpleresource-rcgen.py <http://git.reviewboard.kde.org/r/108916/#comment20529> Why do you need these as global? Usually global variables in Python are a bad idea. services/storage/rcgen/nepomuk-simpleresource-rcgen.py <http://git.reviewboard.kde.org/r/108916/#comment20530> type="str" is by default, no need to add it. Also why nargs=1? IIRC, nargs is by default 1. - Luca Beltrame On Feb. 12, 2013, 12:59 a.m., Jörg Ehrichs wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/108916/ > ----------------------------------------------------------- > > (Updated Feb. 12, 2013, 12:59 a.m.) > > > Review request for Nepomuk, Sebastian Trueg and Vishesh Handa. > > > Description > ------- > > To reduce to time necessary for large SimpelResource class generation for > any application that needs more than a few ontologies. > > This patch removes most calls to soprano and uses internal dictionary > handling to generate the classes. Thus the class generation for the > Nepomuk-WebMiner is down from ~25min to less than a second. > > Instead of asking soprano for the properties/range etc of a class > the output of the Soprano parser is used directly. > > > Diffs > ----- > > services/storage/rcgen/nepomuk-simpleresource-rcgen.py d2a4e0c > > Diff: http://git.reviewboard.kde.org/r/108916/diff/ > > > Testing > ------- > > Class output for Nepomuk-WebMiner is exactly the same just faster. > > > Thanks, > > Jörg Ehrichs > >
_______________________________________________ Nepomuk mailing list [email protected] https://mail.kde.org/mailman/listinfo/nepomuk
