This is the mail archive of the rhdb@sources.redhat.com mailing list for the RHDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

rhdb-admin


No patches, but some recommendations:

1) Whenever you use 'expr', you should enclose the args in curly
brackets:

   expr 1 + 2 should be: expr {1 +2}

Same goes for 'if' statements, although I didn't explicitly see any...

This prevents double substitution (i.e. double processing). Not a big
thing, but if there are alot of them, it may add up in the performance.
This should work in most of the cases (there are some outliners).

2) To load Itcl, Itk, and Iwidgets, you only need to do package require
Iwidgets ... it loads Itk, and Itcl as well...

3) You also gain some by packing widgets together that have the same
pack options.

4) In some of the classes, the Itcl commands are not fully qualified,
and rhdb-admin doesn't even startup. I just added namespace import
::itcl::* to make it work, but maybe a better idea is to fully qualify
the Itcl commands, unless you know for sure there won't be any name
clashing. (I think the one I remember was configbody in
NewDisjointListBoxWidget class)

I haven't gone through thoroughly yet, but looks good...

HTH,

    --brett

p.s. more performance tips here: http://mini.net/tcl/348


-- 
Brett Schwarz
brett_schwarz AT yahoo.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]