Overview
| Artifact ID: | 2e676fcb513ecca6a68f58a0e20621ee64856e22 |
|---|---|
| Ticket: | 3519865fffffffffffffffffffffffffffffffff
[package require] is too slow |
| User & Date: | sebres on 2012-04-25 15:32:50 |
Changes
- icomment:
You have probably not correctly understood it with [package require]. Don't need remove [package require] anywhere from source code. You could change package handling so that does not search pkgIndex.tcl everywhere. So for example with preseting [package ifneeded]. Or you can for example make ONE pkgIndex.tcl (as concatenation of all other with set of variable dir) and place it ex. in tcl-inst-dir/lib/globalIndex/pkgIndex.tcl. The same you should make with the tclIndex (auto loading). In init.tcl you can set auto_path alone to the "tcl-inst-dir/lib/globalIndex". Or just make your own makeIndex batch, that do this. Ex. for globalIndex/pkgIndex.tcl: set globdir [info library] ## http: set dir $globdir/http if {![package vsatisfies [package provide Tcl] 8.4]} {return} package ifneeded http 2.7.8 [list tclPkgSetup $dir http 2.7.8 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] ## msgcat: set dir $globdir/msgcat if {![package vsatisfies [package provide Tcl] 8.5]} {return} package ifneeded msgcat 1.4.4 [list source [file join $dir msgcat.tcl]] .... ## next pkgIndex... .... That will completelly eliminate overhead for [glob] to search pkgIndex.tcl and/or tclIndex. - login: "sebres"
- mimetype: "text/plain"
- username: "sebres"