| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
could template strings have a similar result? |
Sorry, something went wrong.
|
LGTM. It's simpler to read too. I think template strings would suffer the same problem as the original code (stringification even when not debugging). |
Sorry, something went wrong.
|
For the %s, yes – for the %j, no. %j is the perf win here. |
Sorry, something went wrong.
There was a problem hiding this comment.
Style nit: this should align with the previous line's parameter
Sorry, something went wrong.
There was a problem hiding this comment.
Done!
Sorry, something went wrong.
`debuglog` uses `%j` as a placeholder for replacement with `JSON.stringify`. So that `JSON.stringify` is only called when the appropriate debug flag is on. The other `%s` changes are for style consistency.
|
LGTM with a style nit |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
|
LGTM but since this touches module we may want more @nodejs/ctc review. |
Sorry, something went wrong.
|
I generally hate how we handle debug() in core anyway, but this is a nice perf win. LGTM. |
Sorry, something went wrong.
|
Seems like everyone is Ok on this. Merge? |
Sorry, something went wrong.
|
@jasnell am I good to land this or do we want to get CTC review? |
Sorry, something went wrong.
|
I think 3 CTC LGTMs and 2 more from collaborators should be sufficient. |
Sorry, something went wrong.
|
Although, has CI been run? |
Sorry, something went wrong.
|
Good catch. CI: https://ci.nodejs.org/job/node-test-pull-request/674/ |
Sorry, something went wrong.
|
+1 :)
|
Sorry, something went wrong.
`debuglog` uses `%j` as a placeholder for replacement with `JSON.stringify`. So that `JSON.stringify` is only called when the appropriate debug flag is on. The other `%s` changes are for style consistency. PR-URL: #3578 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
`debuglog` uses `%j` as a placeholder for replacement with `JSON.stringify`. So that `JSON.stringify` is only called when the appropriate debug flag is on. The other `%s` changes are for style consistency. PR-URL: #3578 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
`debuglog` uses `%j` as a placeholder for replacement with `JSON.stringify`. So that `JSON.stringify` is only called when the appropriate debug flag is on. The other `%s` changes are for style consistency. PR-URL: #3578 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
landed in lts-v4.x-staging as 948af71 |
Sorry, something went wrong.
`debuglog` uses `%j` as a placeholder for replacement with `JSON.stringify`. So that `JSON.stringify` is only called when the appropriate debug flag is on. The other `%s` changes are for style consistency. PR-URL: #3578 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
`debuglog` uses `%j` as a placeholder for replacement with `JSON.stringify`. So that `JSON.stringify` is only called when the appropriate debug flag is on. The other `%s` changes are for style consistency. PR-URL: #3578 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
`debuglog` uses `%j` as a placeholder for replacement with `JSON.stringify`. So that `JSON.stringify` is only called when the appropriate debug flag is on. The other `%s` changes are for style consistency. PR-URL: #3578 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
| Back | FazBrowse Home | New Git URL |
Use debulog's placeholder replacement %j for stringification. So calls to JSON.stringify are only made by debuglog when you're actually debugging. Also, made the remaining calls to debuglog consistent with this style.