Artifacts Associated With Ticket 776614ffffffffffffffffffffffffffffffffff
Ticket change [de5165d09a] (rid 114822) by ysutjandra on 2003-07-24 00:25:07:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Hi, Currently, when I source a file, TCL creates a buffer whose size is equivalent to the size of the file. Then evaluate the buffer altogether. I'm asking for a utility whereby I can specify the size of buffer I want Tcl_SourceObjCmd to work with. And as much as possible, TCL does not grow this buffer size, unless if needed. A possible example where growing the buffer size is needed is if you encounter a flow-control commands such as while, for, etc, or any other commands that require a open-curly-brace and close-curly-brace. This kind of feature will be very useful when most of the time you source a script that is really-really-really huge. A good testcase maybe a 100,000-line script where each line is doing the same thing. for { set i 0 } { $i < 10 } { incr i } { } for { set i 0 } { $i < 10 } { incr i } { } for { set i 0 } { $i < 10 } { incr i } { } ... -- Yohan - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "ysutjandra"
- subsystem initialized to: "45. Parsing and Eval"
- title initialized to: "Incremental evaluation of scripts"
- type initialized to: "RFE"
Ticket change [11e256bf2d] (rid 95217) by dgp on 2003-07-24 09:43:00:
- assignee changed to: "dgp"
- closedate changed to: "2003-07-24T02:43:00"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 Tcl provides the commands [read], [eval], [info complete], and [info script $filename], so it's very simple to construct your own [proc] to do what you want. Given that, I see little need to augment [source] in the manner you suggest.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Rejected"
- status changed to: "Pending"
- username: "dgp"
Ticket change [418fe7ce60] (rid 116213) by ysutjandra on 2003-07-24 11:15:42:
- icomment:
Logged In: YES user_id=799156 I've already tried using the Tcl commands that you suggested. But the runtime turned out to be very slow on a huge script. -- Yohan
- login: "ysutjandra"
- mimetype: "text/plain"
- status changed to: "Open"
- username: "ysutjandra"
- icomment:
Ticket change [8b431754a5] (rid 127533) by dkf on 2003-07-24 17:02:43:
- icomment:
Logged In: YES user_id=79902 There's no particular reason why we couldn't redesign Tcl_FSEvalFile() to work incrementally once the file size has gone over some threshold. It wouldn't even be an externally visible alteration AIUI (unless the channel used to read the file is visible during processing... Hmm...)
- login: "dkf"
- mimetype: "text/plain"
- subsystem changed to: "37. File System"
- username: "dkf"
- icomment:
Ticket change [1237787d2e] (rid 147430) by dgp on 2016-07-02 19:03:11:
- closedate changed to: "2457572.29387844"
- comment changed to:
Hi, Currently, when I source a file, TCL creates a buffer whose size is equivalent to the size of the file. Then evaluate the buffer altogether. I'm asking for a utility whereby I can specify the size of buffer I want Tcl_SourceObjCmd to work with. And as much as possible, TCL does not grow this buffer size, unless if needed. A possible example where growing the buffer size is needed is if you encounter a flow-control commands such as while, for, etc, or any other commands that require a open-curly-brace and close-curly-brace. This kind of feature will be very useful when most of the time you source a script that is really-really-really huge. A good testcase maybe a 100,000-line script where each line is doing the same thing. for { set i 0 } { $i < 10 } { incr i } { } for { set i 0 } { $i < 10 } { incr i } { } for { set i 0 } { $i < 10 } { incr i } { } ... -- Yohan - login: "dgp"
- mimetype: "text/plain"
- severity changed to: "Minor"
- status changed to: "Closed"