After I made #266 and tested it, it passed all manual tests and also did perform normally. But after using it locally on real data it performs poorly, taking seconds to unescape everything in my history (I have a 500 entries history π )
After investigating this issues, and reading into the source code of default_unescape_string I found out, that they unescape '' (two single quotes) to ' and tested the input of '' and copying that entry, it was unescaped to ' which is incorrect.
Also the performance problem lies into calling C functions is rather expensive, and doing it for ~500 entries takes a few seconds, even if the C function is fast, the transition costs to much in this case.
Type of change
[x] Bug fix (non-breaking change which fixes an issue)
This also adds tests π
Note the new tests fail without this patch, so they can catch errors π
Checklist
[x] My code follows the style guidelines of this project
[x] My commits follow the commit standards of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have checked my code and corrected any misspellings
Description
Fixes #296
After I made #266 and tested it, it passed all manual tests and also did perform normally. But after using it locally on real data it performs poorly, taking seconds to unescape everything in my history (I have a 500 entries history π )
After investigating this issues, and reading into the source code of
default_unescape_string
I found out, that they unescape''
(two single quotes) to'
and tested the input of''
and copying that entry, it was unescaped to'
which is incorrect.Also the performance problem lies into calling C functions is rather expensive, and doing it for ~500 entries takes a few seconds, even if the C function is fast, the transition costs to much in this case.
Type of change
This also adds tests π
Note the new tests fail without this patch, so they can catch errors π
Checklist