Tcl Source Code

View Ticket
Login
Ticket UUID: 1080039
Title: safe.test performance
Type: Bug Version: obsolete: 8.5a2
Submitter: dgp Created on: 2004-12-06 15:56:27
Subsystem: 33. Safe Base Assigned To: dgp
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2004-12-07 05:40:09
Resolution: Accepted Closed By: dgp
    Closed on: 2004-12-06 22:40:09
Description:
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.
User Comments: dgp added on 2004-12-07 05:40:09:
Logged In: YES 
user_id=80530

committing for 8.5a2.

dgp added on 2004-12-06 22:57:21:
Logged In: YES 
user_id=80530

same technique also helps
Tk's safe.test

dgp added on 2004-12-06 22:56:28:

File Added - 111456: safe.patch

Attachments: