Modify ↓
Opened 4 years ago
Closed 4 years ago
#3852 closed Bug (Fixed)
_ArrayToString -> speed optimization
| Reported by: | Zedna | Owned by: | J-Paul Mesnage |
|---|---|---|---|
| Milestone: | 3.3.15.5 | Component: | Standard UDFs |
| Version: | 3.3.15.4 | Severity: | None |
| Keywords: | Cc: |
Description
StringLen($sDelim_Col) is called for each row
but it should be called only once before For/Next loop.
original part of code:
For $i = $iStart_Row To $iEnd_Row For $j = $iStart_Col To $iEnd_Col $sRet &= $aArray[$i][$j] & $sDelim_Col Next $sRet = StringTrimRight($sRet, StringLen($sDelim_Col)) & $sDelim_Row Next Return StringTrimRight($sRet, StringLen($sDelim_Row))
optimized part of code:
$iDelimColLen = StringLen($sDelim_Col) For $i = $iStart_Row To $iEnd_Row For $j = $iStart_Col To $iEnd_Col $sRet &= $aArray[$i][$j] & $sDelim_Col Next $sRet = StringTrimRight($sRet, $iDelimColLen) & $sDelim_Row Next Return StringTrimRight($sRet, StringLen($sDelim_Row))
Attachments (0)
Change History (1)
comment:1 by , 4 years ago
| Milestone: | → 3.3.15.5 |
|---|---|
| Owner: | set to |
| Resolution: | → Fixed |
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

Fixed by revision [12597] in version: 3.3.15.5