Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2005-07-06
04:11 • Closed ticket [1077262fff]: redo refcounting of encodings plus 8 other chang... artifact: ded9feaaca user: dgp
2005-06-03
02:59 • Ticket [1077262fff]: 5 changes artifact: dc769cbf90 user: dgp
2005-04-28
04:57 • Ticket [1077262fff]: 4 changes artifact: 5885804e8a user: dgp
04:57 • Add attachment 1077262-84.patch to ticket [1077262fff] artifact: cefd80267e user: dgp
04:57 • Ticket [1077262fff] redo refcounting of encodings status still Open with 5 o... artifact: 605885a217 user: dgp
2005-04-09
03:03 • Ticket [1077262fff]: 4 changes artifact: 190fdd0790 user: dgp
02:57 • Ticket [1077262fff]: 4 changes artifact: 3e903840ee user: dgp
02:57 • Add attachment 1077262.patch to ticket [1077262fff] artifact: ba9ae91762 user: dgp
2004-12-03
01:10 • Ticket [1077262fff] redo refcounting of encodings status still Open with 4 o... artifact: a96516739a user: hobbs
2004-12-02
02:36 • New ticket [1077262fff]. artifact: 5437d84db4 user: dgp

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: