Overview
| Artifact ID: | 8eca594792d6ca161eea668896c8e963de2013e8 |
|---|---|
| Ticket: | 871583ffffffffffffffffffffffffffffffffff
filesystem optimization, committed jan 2004 |
| User & Date: | dgp on 2004-01-16 01:44:12 |
Changes
- icomment:
Logged In: YES user_id=80530 In the duplicated stanza of code noted before, there is a call to Tcl_FSSplitPath() on the pathObj returned by [glob]. That pathObj was created by TclNewFSPathObj() and has the special structure you noted before. Tcl_FSSplitPath calls TclFSGetPathType() which calls Tcl_FSConvertToPathType(). which was modified by this patch. Prior to the patch, T_FSCTPT sees a typePtr of &tclFsPathType and quickly returns TCL_OK. After the patch, there's a check of fsPathPtr->cwdPtr and since it holds the value of the directory globbed and not the current working directory of the process, the pathObj is reconstructed by generating it's string rep, then re-parsing. Appears that's where the time difference comes from. Seems that if either Tcl_FSSplitPath() or TclFSGetPathType() were updated to recognize the optimized form and process it more efficiently without a string rep re-parsing, this slowdown might be avoided. It might be, though, that the re-parsing just has to happen at some point, so you just have to pick where.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"