E&S CVS Commit: pylib [Simplification-Branch] - Looks like we have a winner. Interface docs and encapsulation are a

pje at eby-sarna.com pje at eby-sarna.com
Tue Jan 22 12:16:00 EST 2002


Module Name:	pylib
Committed By:	pje
Date:		Tue Jan 22 17:15:45 UTC 2002

Modified Files:
	pylib/TW [Simplification-Branch]: Interfaces.py Specifications.py
	    Targets.py __init__.py
	pylib/TW/tests [Simplification-Branch]: Components.py
Added Files:
	pylib/TW [Simplification-Branch]: Advisors.py Interpreters.py
Removed Files:
	pylib/TW [Simplification-Branch]: Builders.py Components.py
	    Strategies.py

Log Message:
Looks like we have a winner.  Interface docs and encapsulation are a
complete shambles, but I've shaved another 20-25% off the UML class build
time, according to the Python profiler.  The architecture is now cleanly
divided into Advisors, Interpreters, and Targets, where Targets use
Interpreters to interpret the specs and Advisors to pre- or post-
process the result.  Advisors are even easier to write than before (no
chaining to worry about), and it's rare that special interpreters will be
needed.  The Target class has been fine-tuned for the absolute minimum
overhead, inlining certain operations and now using a regular dictionary
instead of WeakValueDictionary (which had bugs, anyway) for the path cache.
A try/finally in build() trivially cleans up the circular references that
result.  It might be possible to eke some more performance out of this
puppy, but it's not likely and probably not worth the effort.  But the API
simplification almost certainly was worth it, with better modularization
*and* about a 33% drop in kernel implementation line count.


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/pylib/TW/Advisors.py?rev=1.1.2.1&content-type=text/vnd.viewcvs-markup
http://cvs.eby-sarna.com/pylib/TW/Interpreters.py?rev=1.1.2.1&content-type=text/vnd.viewcvs-markup
http://cvs.eby-sarna.com/pylib/TW/Interfaces.py.diff?r1=1.12.2.1&r2=1.12.2.2
http://cvs.eby-sarna.com/pylib/TW/Specifications.py.diff?r1=1.4.2.1&r2=1.4.2.2
http://cvs.eby-sarna.com/pylib/TW/Targets.py.diff?r1=1.1.2.2&r2=1.1.2.3
http://cvs.eby-sarna.com/pylib/TW/__init__.py.diff?r1=1.9.2.1&r2=1.9.2.2
http://cvs.eby-sarna.com/pylib/TW/tests/Components.py.diff?r1=1.8.2.2&r2=1.8.2.3

To generate a diff of this commit:
cvs rdiff -r0 -r1.1.2.1 pylib/TW/Advisors.py pylib/TW/Interpreters.py
cvs rdiff -r1.27 -r0 pylib/TW/Builders.py
cvs rdiff -r1.38 -r0 pylib/TW/Components.py
cvs rdiff -r1.12.2.1 -r1.12.2.2 pylib/TW/Interfaces.py
cvs rdiff -r1.4.2.1 -r1.4.2.2 pylib/TW/Specifications.py
cvs rdiff -r1.1.2.2 -r0 pylib/TW/Strategies.py
cvs rdiff -r1.1.2.2 -r1.1.2.3 pylib/TW/Targets.py
cvs rdiff -r1.9.2.1 -r1.9.2.2 pylib/TW/__init__.py
cvs rdiff -r1.8.2.2 -r1.8.2.3 pylib/TW/tests/Components.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.





More information about the source-changes mailing list