| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
This PR optimizes UTF-8 decoding in the encoding binding by avoiding redundant UTF-8 validation when input has already been validated.
Changes:
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/string_bytes.h | Declares a new EncodeValidatedUTF8() entry point for already-validated UTF-8. |
| src/string_bytes.cc | Implements EncodeValidatedUTF8() and factors out the fast conversion helper used by both code paths. |
| src/encoding_binding.cc | Uses EncodeValidatedUTF8() after explicit UTF-8 validation to avoid re-validation overhead. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
Codecov Report❌ Patch coverage is 66.66667% with 5 lines in your changes missing coverage. Please review.
@@ Coverage Diff @@
## main #63587 +/- ##
=======================================
Coverage 90.34% 90.35%
=======================================
Files 732 732
Lines 236689 236681 -8
Branches 44586 44584 -2
=======================================
+ Hits 213839 213842 +3
+ Misses 14550 14548 -2
+ Partials 8300 8291 -9
... and 23 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
|
CC @nodejs/performance |
Sorry, something went wrong.
|
I also tried to fix this in #63231, but this pr more generally, good work! |
Sorry, something went wrong.
Uh, my bad, I haven't seen it. I'm okay with closing this PR in favour of yours. |
Sorry, something went wrong.
|
No problem at all, thanks for your effort. This PR seems like a better solution to me, @addaleax, Do you have any thoughts? |
Sorry, something went wrong.
|
@mertcanaltin @addaleax I rebased the branch, it's just a small DRY refactoring now |
Sorry, something went wrong.
Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
| Back | FazBrowse Home | New Git URL |
Upstream PR #63231 added StringBytes::EncodeValidUtf8 but duplicated the EncodeTwoByteString block already present in StringBytes::Encode.
This PR refactors that by extracting a shared EncodeValidNonAsciiUtf8 helper, called from both EncodeValidUtf8 and the existing Encode UTF-8 path.