redo refcounting of encodings
Closed / Fixed1077262fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 21 years ago
Descriptionplain2004-12-02 02:36:16
encodings are freed too easily. Once an encoding has been used by a program at all, it should be kept loaded, since it's likely to be needed again. As is, the [encoding convertfrom] command will load an encoding from a disk file, +count, use it, -count, and destroy it, all before returning. Makes for many too many disk reads. Changing the refcounts should not be too hard, but there's also work to do updating the tests in the test suite that actually insist on this rapid purge of encoding data.
hobbsplain2004-12-03 01:10:57
Logged In: YES user_id=72656 Perhaps a cache (quasi like REs have) of the last 10 used encodings get an extra refcount? That way we have a pointer to free on exit, and we don't keep all used encodings loaded.
dgpplain2005-04-09 02:57:23
File Added - 129104: 1077262.patch Logged In: YES user_id=80530 attached patch uses a Tcl_ObjType to cache Tcl_Encoding as an internal rep, and updates the [encoding convert*] commands to use it, fixing the worst of these problems.
dgpplain2005-04-09 03:03:46
Logged In: YES user_id=80530 patch committed. Leaving report open as a prompt to consider moving the new TclGetEncodingFromObj to the public interface.
dgpplain2005-04-28 04:57:17
Logged In: YES user_id=80530 Here's the corresponding patch for the 8.4 branch.
dgpplain2005-04-28 04:57:19
File Added - 132026: 1077262-84.patch
dgpplain2005-06-03 02:59:12
Logged In: YES user_id=80530 this slipped 8.4.10; raising priority so it makes 8.4.11
dgpplain2005-07-06 04:11:55
Logged In: YES user_id=80530 heh. oh well. Committing for 8.4.12 anyway. Closing; will open Tcl_GetEncodingFromObj() RFE separately.
Log in (anonymous is fine) to add a comment.
Attachments:
- 1077262-84.patch [download] added by dgp on 2005-04-28 04:57:18. [details]
- 1077262.patch [download] added by dgp on 2005-04-09 02:57:23. [details]