Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2004-12-07
05:40 • Closed ticket [1080039fff]: safe.test performance plus 8 other changes artifact: c9078f2a24 user: dgp
2004-12-06
22:57 • Ticket [1080039fff]: 4 changes artifact: 85013855f2 user: dgp
22:56 • Ticket [1080039fff]: 4 changes artifact: e4c7d6806b user: dgp
22:56 • Add attachment safe.patch to ticket [1080039fff] artifact: e050e66b5a user: dgp
22:41
* tests/safe.test: Trim auto_path to improve performance [1080039] check-in: 6a514d4d16 user: dgp tags: trunk
15:56 • New ticket [1080039fff] safe.test performance. artifact: b2629429a4 user: dgp

safe.test performance

Closed / Accepted1080039fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2004-12-06 15:56:27
I find that when running Tcl's
test suite, the safe.test file
always takes several minutes
to complete.

Looking into the details of this,
I find that the SafeBase [source]
alias is being force to deal with
hundreds of files, and this all derives
from an ::auto_path list with hundreds
of elements.

Basically every subdirectory of
/usr/local/lib ends up on the ::auto_path,
and on my system, that's a lot of files.

None of them appear to be important
to what's being tested in safe.test, so
the attached patch saves ::auto_path,
sets it to a bare minimum value, and
restores when safe.test tests are done.
Result is much faster.
dgpplain2004-12-06 22:56:28
File Added - 111456: safe.patch
dgpplain2004-12-06 22:57:21
Logged In: YES 
user_id=80530

same technique also helps
Tk's safe.test
dgpplain2004-12-07 05:40:09
Logged In: YES 
user_id=80530

committing for 8.5a2.
Log in (anonymous is fine) to add a comment.

Attachments: