core-agent-ide/codex-cli
Yonatan Lavy 6d4c4b1bdd
refactor: improve performance of renderFilesToXml using Array.join (#127)
### Summary

Refactored the `renderFilesToXml` function to improve performance and
readability by replacing iterative string concatenation with
`Array.map().join()`.

### Changes

- Replaced the `for...of` loop with `files.map(...).join('')`
- Reduced number of string mutation operations
- Preserved the existing XML structure and CDATA safety

### Why

Using `join` avoids repeated string concatenation in loops, which can
improve performance, especially when rendering a large number of files.
It also results in more concise and idiomatic code.


I have read the CLA Document and I hereby sign the CLA
---

Let me know if this needs any adjustments!

Signed-off-by: yonatanlavy <yehonatanmind@gmail.com>
2025-04-16 16:14:57 -07:00
..
examples chore: fixed gramatical errors in prompt examples (#136) 2025-04-16 15:45:29 -07:00
scripts (fix) update Docker container scripts (#47) 2025-04-16 12:02:41 -07:00
src refactor: improve performance of renderFilesToXml using Array.join (#127) 2025-04-16 16:14:57 -07:00
tests Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
.dockerignore (fix) update Docker container scripts (#47) 2025-04-16 12:02:41 -07:00
.editorconfig Initial commit 2025-04-16 12:56:08 -04:00
.eslintrc.cjs Initial commit 2025-04-16 12:56:08 -04:00
build.mjs Initial commit 2025-04-16 12:56:08 -04:00
Dockerfile (fix) update Docker container scripts (#47) 2025-04-16 12:02:41 -07:00
ignore-react-devtools-plugin.js Initial commit 2025-04-16 12:56:08 -04:00
package-lock.json dotenv support (#122) 2025-04-16 15:33:12 -07:00
package.json bump(version): 0.1.2504161510 (#135) 2025-04-16 15:49:32 -07:00
require-shim.js Initial commit 2025-04-16 12:56:08 -04:00
tsconfig.json Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00