Overview
| Artifact ID: | 441cd051202315b93082d258185b59f6783b62927f17a69dde133fbb4f91e67c |
|---|---|
| Ticket: | da16d155744c55d5a769a81b57b0e80045e8391a
unacceptable long file read time by fix of [db4f2843cd] |
| User & Date: | oehhar on 2024-01-14 18:27:26 |
Changes
- foundin changed to: "core-8-6-branch"
- icomment:
This is the ticket of the fix causing the long read time: [db4f2843cd] The issue is within the ReadChars function to read blocks from a channel. <verbatim> Tcl_Size numBytes; int dstLimit = TCL_UTF_MAX - 1 + toRead * factor / UTF_EXPANSION_FACTOR; (void) Tcl_GetStringFromObj(objPtr, &numBytes); Tcl_SetObjLength(objPtr, numBytes + dstLimit); </verbatim> *Tcl_SetObjLength* operates on the string value of the object, even if the word "string" is not in the function name. The description does not say, if the string is in Unicode (16 bit) or UTF-8 (8 bit). The former command was: <verbatim> Tcl_AppendToObj(objPtr, NULL, dstLimit); </verbatim> which did not have the slow-down. The command description states, that it works on Unicode strings (16 bits) prefered. I don't jet really get the comment by Sergey. He states, that channel data is anyway always UTF-8. How may it happen, that the buffer gets converted to 16 bits (Unicode) ? This spot sould be found. I will try to make a debug session within the weak to find this spot. Ticket renamed and version set to core-8-6-branch. Any help appreciated. Thank you and take care, Harald - login: "oehhar"
- mimetype: "text/x-fossil-wiki"
- title changed to:
unacceptable long file read time by fix of [db4f2843cd]
- username: "oehhar"